make: clean up comments and code for setting debug flags

No binary change.
This commit is contained in:
rillig 2022-03-22 23:37:09 +00:00
parent 43aafb237c
commit fa858d4c6e
1 changed files with 6 additions and 11 deletions

View File

@ -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)
{