Module Name:    src
Committed By:   rillig
Date:           Sat Oct 31 09:23:38 UTC 2020

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

Log Message:
make(1): write s2Boolean in a more compact form


To generate a diff of this commit:
cvs rdiff -u -r1.414 -r1.415 src/usr.bin/make/main.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/main.c
diff -u src/usr.bin/make/main.c:1.414 src/usr.bin/make/main.c:1.415
--- src/usr.bin/make/main.c:1.414	Sat Oct 31 09:20:07 2020
+++ src/usr.bin/make/main.c	Sat Oct 31 09:23:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.414 2020/10/31 09:20:07 rillig Exp $	*/
+/*	$NetBSD: main.c,v 1.415 2020/10/31 09:23:38 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -118,7 +118,7 @@
 #include "trace.h"
 
 /*	"@(#)main.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: main.c,v 1.414 2020/10/31 09:20:07 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.415 2020/10/31 09:23:38 rillig Exp $");
 #if defined(MAKE_NATIVE) && !defined(lint)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
 	    "The Regents of the University of California.  "
@@ -2215,23 +2215,12 @@ s2Boolean(const char *s, Boolean bf)
 	case 'f':
 	case 'N':
 	case 'n':
-	    bf = FALSE;
-	    break;
+	    return FALSE;
 	case 'O':
 	case 'o':
-	    switch (s[1]) {
-	    case 'F':
-	    case 'f':
-		bf = FALSE;
-		break;
-	    default:
-		bf = TRUE;
-		break;
-	    }
-	    break;
+	    return s[1] != 'F' && s[1] != 'f';
 	default:
-	    bf = TRUE;
-	    break;
+	    return TRUE;
 	}
     }
     return bf;

Reply via email to