Module Name:    src
Committed By:   rillig
Date:           Tue Mar 22 23:37:10 UTC 2022

Modified Files:
        src/usr.bin/make: main.c

Log Message:
make: clean up comments and code for setting debug flags

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.578 -r1.579 src/usr.bin/make/main.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.578 src/usr.bin/make/main.c:1.579
--- src/usr.bin/make/main.c:1.578	Wed Feb  9 20:52:06 2022
+++ src/usr.bin/make/main.c	Tue Mar 22 23:37:09 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.578 2022/02/09 20:52:06 rillig Exp $	*/
+/*	$NetBSD: main.c,v 1.579 2022/03/22 23:37:09 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -111,7 +111,7 @@
 #include "trace.h"
 
 /*	"@(#)main.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: main.c,v 1.578 2022/02/09 20:52:06 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.579 2022/03/22 23:37:09 rillig Exp $");
 #if defined(MAKE_NATIVE) && !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
 	    "The Regents of the University of California.  "
@@ -314,7 +314,7 @@ MainParseArgDebug(const char *argvalue)
 			break;
 		case 'F':
 			MainParseArgDebugFile(modules + 1);
-			goto debug_setbuf;
+			goto finish;
 		default:
 			(void)fprintf(stderr,
 			    "%s: illegal argument to d option -- %c\n",
@@ -323,20 +323,15 @@ MainParseArgDebug(const char *argvalue)
 		}
 	}
 
-debug_setbuf:
+finish:
 	opts.debug = debug;
 
-	/*
-	 * Make the debug_file unbuffered, and make
-	 * stdout line buffered (unless debugfile == stdout).
-	 */
 	setvbuf(opts.debug_file, NULL, _IONBF, 0);
-	if (opts.debug_file != stdout) {
+	if (opts.debug_file != stdout)
 		setvbuf(stdout, NULL, _IOLBF, 0);
-	}
 }
 
-/* Is path relative, or does it contain any relative component "." or ".."? */
+/* Is path relative or does it contain any relative component "." or ".."? */
 static bool
 IsRelativePath(const char *path)
 {

Reply via email to