diff options
| author | Paul Eggert <eggert@cs.ucla.edu> | 2025-07-01 11:53:33 -0700 |
|---|---|---|
| committer | Paul Eggert <eggert@cs.ucla.edu> | 2025-07-09 17:12:40 -0700 |
| commit | fb20a7d3e47dac222efaecc2837610e61349a8fe (patch) | |
| tree | f33f3df2b0c1102955750ac855dfd2d27dd1a51f | |
| parent | factor: define SQUARE_OF_FIRST_OMITTED_PRIME (diff) | |
| download | coreutils-fb20a7d3e47dac222efaecc2837610e61349a8fe.tar.gz coreutils-fb20a7d3e47dac222efaecc2837610e61349a8fe.zip | |
factor: no ferror+fclose
* src/make-prime-list.c (main): Avoid parallel calls
to ferror and fclose.
| -rw-r--r-- | src/make-prime-list.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/make-prime-list.c b/src/make-prime-list.c index 2fd10f760..fbeac1736 100644 --- a/src/make-prime-list.c +++ b/src/make-prime-list.c @@ -234,7 +234,7 @@ main (int argc, char **argv) free (sieve); free (prime_list); - if (ferror (stdout) + fclose (stdout)) + if (ferror (stdout) || fclose (stdout)) { fprintf (stderr, "write error: %s\n", strerror (errno)); return EXIT_FAILURE; |
