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(1): use correct character literals in TryP...



details:   https://anonhg.NetBSD.org/src/rev/06a9c9002af2
branches:  trunk
changeset: 1014124:06a9c9002af2
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Sep 12 18:02:43 2020 +0000

description:
make(1): use correct character literals in TryParseNumber

diffstat:

 usr.bin/make/cond.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (39 lines):

diff -r 39e0cea4ae7d -r 06a9c9002af2 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Sat Sep 12 18:01:51 2020 +0000
+++ b/usr.bin/make/cond.c       Sat Sep 12 18:02:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cond.c,v 1.138 2020/09/12 17:14:40 rillig Exp $        */
+/*     $NetBSD: cond.c,v 1.139 2020/09/12 18:02:43 rillig Exp $        */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -70,14 +70,14 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: cond.c,v 1.138 2020/09/12 17:14:40 rillig Exp $";
+static char rcsid[] = "$NetBSD: cond.c,v 1.139 2020/09/12 18:02:43 rillig Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
 #if 0
 static char sccsid[] = "@(#)cond.c     8.2 (Berkeley) 1/2/94";
 #else
-__RCSID("$NetBSD: cond.c,v 1.138 2020/09/12 17:14:40 rillig Exp $");
+__RCSID("$NetBSD: cond.c,v 1.139 2020/09/12 18:02:43 rillig Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -378,10 +378,10 @@
     }
     l_val = strtoul(str, &eptr, str[1] == 'x' ? 16 : 10);
     ech = *eptr;
-    if (ech == 0 && errno != ERANGE) {
+    if (ech == '\0' && errno != ERANGE) {
        d_val = str[0] == '-' ? -(double)-l_val : (double)l_val;
     } else {
-       if (ech != 0 && ech != '.' && ech != 'e' && ech != 'E')
+       if (ech != '\0' && ech != '.' && ech != 'e' && ech != 'E')
            return FALSE;
        d_val = strtod(str, &eptr);
        if (*eptr)



Home | Main Index | Thread Index | Old Index