Fix test_fread return value on error

This commit is contained in:
Colin Leroy-Mira
2025-01-01 13:23:30 +01:00
parent 50cccc2c3a
commit 5531320b51

View File

@@ -51,6 +51,7 @@ int main(int argc,char **argv)
if (r == 0) { if (r == 0) {
printf("Error: could not start reading.\n"); printf("Error: could not start reading.\n");
return EXIT_FAILURE;
} }
fwrite(buf, 1, r, stdout); fwrite(buf, 1, r, stdout);
@@ -63,6 +64,7 @@ int main(int argc,char **argv)
if (!feof(in)) if (!feof(in))
{ {
printf("We should have EOF!\n"); printf("We should have EOF!\n");
return EXIT_FAILURE;
} }
fclose(in); fclose(in);