git: 0821423134b5 - stable/13 - sort: deindent closefile

From: Baptiste Daroussin <bapt_at_FreeBSD.org>
Date: Wed, 19 Oct 2022 08:01:37 UTC
The branch stable/13 has been updated by bapt:

URL: https://cgit.FreeBSD.org/src/commit/?id=0821423134b54ea490882640e956a65e29cf124e

commit 0821423134b54ea490882640e956a65e29cf124e
Author:     Baptiste Daroussin <bapt@FreeBSD.org>
AuthorDate: 2022-10-13 08:38:12 +0000
Commit:     Baptiste Daroussin <bapt@FreeBSD.org>
CommitDate: 2022-10-19 07:59:30 +0000

    sort: deindent closefile
    
    (cherry picked from commit f9d9a7cc4f2ff38795e5056721297e2b8442bf7a)
---
 usr.bin/sort/file.c | 20 +++++++++-----------
 1 file 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);
 }
 
 /*