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(1): inline strncmp in Parse_IsVar



details:   https://anonhg.NetBSD.org/src/rev/d7452256738e
branches:  trunk
changeset: 1016073:d7452256738e
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Nov 08 02:37:22 2020 +0000

description:
make(1): inline strncmp in Parse_IsVar

The usual compilers don't do this themselves.

diffstat:

 usr.bin/make/parse.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 90db9741312c -r d7452256738e usr.bin/make/parse.c
--- a/usr.bin/make/parse.c      Sun Nov 08 02:33:18 2020 +0000
+++ b/usr.bin/make/parse.c      Sun Nov 08 02:37:22 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: parse.c,v 1.432 2020/11/07 23:41:38 rillig Exp $       */
+/*     $NetBSD: parse.c,v 1.433 2020/11/08 02:37:22 rillig Exp $       */
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -117,7 +117,7 @@
 #include "pathnames.h"
 
 /*     "@(#)parse.c    8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: parse.c,v 1.432 2020/11/07 23:41:38 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.433 2020/11/08 02:37:22 rillig Exp $");
 
 /* types and constants */
 
@@ -1854,7 +1854,7 @@
            ch = *p++;
 
 #ifdef SUNSHCMD
-       if (ch == ':' && strncmp(p, "sh", 2) == 0) {
+       if (ch == ':' && p[0] == 's' && p[1] == 'h') {
            p += 2;
            continue;
        }



Home | Main Index | Thread Index | Old Index