Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/make getBoolean:



details:   https://anonhg.NetBSD.org/src/rev/a2f112513716
branches:  trunk
changeset: 343649:a2f112513716
user:      sjg <sjg%NetBSD.org@localhost>
date:      Fri Feb 19 00:11:45 2016 +0000

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

diffstat:

 usr.bin/make/main.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r 8e1519d407fd -r a2f112513716 usr.bin/make/main.c
--- a/usr.bin/make/main.c       Thu Feb 18 23:33:25 2016 +0000
+++ b/usr.bin/make/main.c       Fri Feb 19 00:11:45 2016 +0000
@@ -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 @@
 #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 @@
     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) {



Home | Main Index | Thread Index | Old Index