Module Name:    src
Committed By:   sjg
Date:           Fri Feb 19 00:11:45 UTC 2016

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

Log Message:
getBoolean:
We need :U to ensure we get an empty string if knob isn't set.


To generate a diff of this commit:
cvs rdiff -u -r1.240 -r1.241 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.240 src/usr.bin/make/main.c:1.241
--- src/usr.bin/make/main.c:1.240	Thu Feb 18 20:25:08 2016
+++ src/usr.bin/make/main.c	Fri Feb 19 00:11:45 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.240 2016/02/18 20:25:08 sjg Exp $	*/
+/*	$NetBSD: main.c,v 1.241 2016/02/19 00:11:45 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.240 2016/02/18 20:25:08 sjg Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.241 2016/02/19 00:11:45 sjg Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
@@ -81,7 +81,7 @@ __COPYRIGHT("@(#) Copyright (c) 1988, 19
 #if 0
 static char sccsid[] = "@(#)main.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.240 2016/02/18 20:25:08 sjg Exp $");
+__RCSID("$NetBSD: main.c,v 1.241 2016/02/19 00:11:45 sjg Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -2002,7 +2002,7 @@ getBoolean(const char *name, Boolean bf)
     char tmp[64];
     char *cp;
 
-    if (snprintf(tmp, sizeof(tmp), "${%s:tl}", name) < (int)(sizeof(tmp))) {
+    if (snprintf(tmp, sizeof(tmp), "${%s:U:tl}", name) < (int)(sizeof(tmp))) {
 	cp = Var_Subst(NULL, tmp, VAR_GLOBAL, VARF_WANTRES);
 
 	if (cp) {

Reply via email to