Module Name:    src
Committed By:   rillig
Date:           Sat Nov  7 20:11:32 UTC 2020

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

Log Message:
make(1): fix type mismatch in If_Eval

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


To generate a diff of this commit:
cvs rdiff -u -r1.181 -r1.182 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.181 src/usr.bin/make/cond.c:1.182
--- src/usr.bin/make/cond.c:1.181	Sat Nov  7 14:40:51 2020
+++ src/usr.bin/make/cond.c	Sat Nov  7 20:11:32 2020
@@ -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 @@ static Boolean
 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

Reply via email to