diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2022-10-13 08:38:12 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2022-10-13 08:38:12 +0000 |
commit | f9d9a7cc4f2ff38795e5056721297e2b8442bf7a (patch) | |
tree | df39c09a67027392847a745c04407524ba5b34a6 /usr.bin | |
parent | 48a53cc4849555f1a0b805adddb9f517a305a2ae (diff) | |
download | src-f9d9a7cc4f2ff38795e5056721297e2b8442bf7a.tar.gz src-f9d9a7cc4f2ff38795e5056721297e2b8442bf7a.zip |
sort: deindent closefile
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/sort/file.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/usr.bin/sort/file.c b/usr.bin/sort/file.c index 05058a2509b5..8f9d8ac89b5b 100644 --- a/usr.bin/sort/file.c +++ b/usr.bin/sort/file.c @@ -574,19 +574,17 @@ openfile(const char *fn, const char *mode) void closefile(FILE *f, const char *fn) { - if (f == NULL) { - ; - } else if (f == stdin) { - ; - } else if (f == stdout) { + if (f == NULL || f = stdin) + return; + if (f == stdout) { fflush(f); - } else { - if (file_is_tmp(fn) && compress_program != NULL) { - if(pclose(f)<0) - err(2,NULL); - } else - fclose(f); + return; } + if (file_is_tmp(fn) && compress_program != NULL) { + if(pclose(f)<0) + err(2,NULL); + } else + fclose(f); } /* |