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: make code for string matching syntactical...



details:   https://anonhg.NetBSD.org/src/rev/798b819b50b9
branches:  trunk
changeset: 362593:798b819b50b9
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Mar 03 19:50:01 2022 +0000

description:
make: make code for string matching syntactically more consistent

No functional change.

diffstat:

 usr.bin/make/str.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (30 lines):

diff -r d1aa77e31972 -r 798b819b50b9 usr.bin/make/str.c
--- a/usr.bin/make/str.c        Thu Mar 03 19:46:31 2022 +0000
+++ b/usr.bin/make/str.c        Thu Mar 03 19:50:01 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: str.c,v 1.88 2021/12/15 10:57:01 rillig Exp $  */
+/*     $NetBSD: str.c,v 1.89 2022/03/03 19:50:01 rillig Exp $  */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -71,7 +71,7 @@
 #include "make.h"
 
 /*     "@(#)str.c      5.8 (Berkeley) 6/1/90"  */
-MAKE_RCSID("$NetBSD: str.c,v 1.88 2021/12/15 10:57:01 rillig Exp $");
+MAKE_RCSID("$NetBSD: str.c,v 1.89 2022/03/03 19:50:01 rillig Exp $");
 
 
 static HashTable interned_strings;
@@ -364,9 +364,9 @@
                                if (pat[1] == '-') {
                                        if (pat[2] == '\0')
                                                return neg;
-                                       if (*pat <= *str && pat[2] >= *str)
+                                       if (pat[0] <= *str && *str <= pat[2])
                                                break;
-                                       if (*pat >= *str && pat[2] <= *str)
+                                       if (pat[2] <= *str && *str <= pat[0])
                                                break;
                                        pat += 2;
                                }



Home | Main Index | Thread Index | Old Index