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): fix type mismatch in If_Eval



details:   https://anonhg.NetBSD.org/src/rev/e866319e4022
branches:  trunk
changeset: 956780:e866319e4022
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Nov 07 20:11:32 2020 +0000

description:
make(1): fix type mismatch in If_Eval

No practical consequences since TOK_FALSE == 0 and TOK_TRUE == 1.

diffstat:

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

diffs (27 lines):

diff -r ed49ae4ce6a3 -r e866319e4022 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Sat Nov 07 20:03:56 2020 +0000
+++ b/usr.bin/make/cond.c       Sat Nov 07 20:11:32 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cond.c,v 1.181 2020/11/07 14:40:51 rillig Exp $        */
+/*     $NetBSD: cond.c,v 1.182 2020/11/07 20:11:32 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.181 2020/11/07 14:40:51 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.182 2020/11/07 20:11:32 rillig Exp $");
 
 /*
  * The parsing of conditional expressions is based on this grammar:
@@ -519,7 +519,7 @@
 If_Eval(const struct If *if_info, const char *arg, size_t arglen)
 {
     Boolean res = if_info->defProc(arglen, arg);
-    return (if_info->doNot ? !res : res) ? TOK_TRUE : TOK_FALSE;
+    return if_info->doNot ? !res : res;
 }
 
 /* Evaluate a "comparison without operator", such as in ".if ${VAR}" or



Home | Main Index | Thread Index | Old Index