Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make: clean up comments and code for setting de...



details:   https://anonhg.NetBSD.org/src/rev/f7c5cc979ef8
branches:  trunk
changeset: 364410:f7c5cc979ef8
user:      rillig <rillig%NetBSD.org@localhost>
date:      Tue Mar 22 23:37:09 2022 +0000

description:
make: clean up comments and code for setting debug flags

No binary change.

diffstat:

 usr.bin/make/main.c |  17 ++++++-----------
 1 files changed, 6 insertions(+), 11 deletions(-)

diffs (51 lines):

diff -r 9f69cffdc4af -r f7c5cc979ef8 usr.bin/make/main.c
--- a/usr.bin/make/main.c       Tue Mar 22 21:45:13 2022 +0000
+++ b/usr.bin/make/main.c       Tue Mar 22 23:37:09 2022 +0000
@@ -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 @@
                        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 @@
                }
        }
 
-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)
 {



Home | Main Index | Thread Index | Old Index