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: list comparison operators in declaration ...



details:   https://anonhg.NetBSD.org/src/rev/8d1dcd30a986
branches:  trunk
changeset: 369925:8d1dcd30a986
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Sep 08 05:52:56 2022 +0000

description:
make: list comparison operators in declaration order

This allows a tiny optimization in the switch statement.

No functional change.

diffstat:

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

diffs (32 lines):

diff -r 526f90eb32d2 -r 8d1dcd30a986 usr.bin/make/cond.c
--- a/usr.bin/make/cond.c       Thu Sep 08 05:43:20 2022 +0000
+++ b/usr.bin/make/cond.c       Thu Sep 08 05:52:56 2022 +0000
@@ -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 @@
                return lhs > rhs;
        case GE:
                return lhs >= rhs;
-       case NE:
+       case EQ:
+               return lhs == rhs;
+       default:
                return lhs != rhs;
-       default:
-               return lhs == rhs;
        }
 }
 



Home | Main Index | Thread Index | Old Index