Module Name: src
Committed By: rillig
Date: Sun Nov 8 22:44:05 UTC 2020
Modified Files:
src/usr.bin/make: cond.c
Log Message:
make(1): improve local variable name in EvalNotEmpty
To generate a diff of this commit:
cvs rdiff -u -r1.191 -r1.192 src/usr.bin/make/cond.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/cond.c
diff -u src/usr.bin/make/cond.c:1.191 src/usr.bin/make/cond.c:1.192
--- src/usr.bin/make/cond.c:1.191 Sun Nov 8 22:41:40 2020
+++ src/usr.bin/make/cond.c Sun Nov 8 22:44:05 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: cond.c,v 1.191 2020/11/08 22:41:40 rillig Exp $ */
+/* $NetBSD: cond.c,v 1.192 2020/11/08 22:44:05 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -93,7 +93,7 @@
#include "dir.h"
/* "@(#)cond.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: cond.c,v 1.191 2020/11/08 22:41:40 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.192 2020/11/08 22:44:05 rillig Exp $");
/*
* The parsing of conditional expressions is based on this grammar:
@@ -534,15 +534,15 @@ If_Eval(const struct If *if_info, const
static Boolean
EvalNotEmpty(CondParser *par, const char *value, Boolean quoted)
{
- double left;
+ double num;
/* For .ifxxx "...", check for non-empty string. */
if (quoted)
return value[0] != '\0';
/* For .ifxxx <number>, compare against zero */
- if (TryParseNumber(value, &left))
- return left != 0.0;
+ if (TryParseNumber(value, &num))
+ return num != 0.0;
/* For .if ${...}, check for non-empty string (defProc is ifdef). */
if (par->if_info->form[0] == '\0')