Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/freebsd/freebsd-src.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBaptiste Daroussin <bapt@FreeBSD.org>2022-10-13 11:38:12 +0300
committerBaptiste Daroussin <bapt@FreeBSD.org>2022-10-13 11:38:12 +0300
commitf9d9a7cc4f2ff38795e5056721297e2b8442bf7a (patch)
treedf39c09a67027392847a745c04407524ba5b34a6 /usr.bin
parent48a53cc4849555f1a0b805adddb9f517a305a2ae (diff)
sort: deindent closefile
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/sort/file.c20
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);
}
/*