Module Name:    src
Committed By:   rillig
Date:           Thu Sep  8 05:52:56 UTC 2022

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

Log Message:
make: list comparison operators in declaration order

This allows a tiny optimization in the switch statement.

No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.336 -r1.337 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.336 src/usr.bin/make/cond.c:1.337
--- src/usr.bin/make/cond.c:1.336	Sun Sep  4 22:55:00 2022
+++ src/usr.bin/make/cond.c	Thu Sep  8 05:52:56 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: cond.c,v 1.336 2022/09/04 22:55:00 rillig Exp $	*/
+/*	$NetBSD: cond.c,v 1.337 2022/09/08 05:52:56 rillig Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -95,7 +95,7 @@
 #include "dir.h"
 
 /*	"@(#)cond.c	8.2 (Berkeley) 1/2/94"	*/
-MAKE_RCSID("$NetBSD: cond.c,v 1.336 2022/09/04 22:55:00 rillig Exp $");
+MAKE_RCSID("$NetBSD: cond.c,v 1.337 2022/09/08 05:52:56 rillig Exp $");
 
 /*
  * Conditional expressions conform to this grammar:
@@ -570,10 +570,10 @@ EvalCompareNum(double lhs, ComparisonOp 
 		return lhs > rhs;
 	case GE:
 		return lhs >= rhs;
-	case NE:
-		return lhs != rhs;
-	default:
+	case EQ:
 		return lhs == rhs;
+	default:
+		return lhs != rhs;
 	}
 }
 

Reply via email to