Module Name: src Committed By: rillig Date: Sun Nov 8 02:37:22 UTC 2020
Modified Files: src/usr.bin/make: parse.c Log Message: make(1): inline strncmp in Parse_IsVar The usual compilers don't do this themselves. To generate a diff of this commit: cvs rdiff -u -r1.432 -r1.433 src/usr.bin/make/parse.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/parse.c diff -u src/usr.bin/make/parse.c:1.432 src/usr.bin/make/parse.c:1.433 --- src/usr.bin/make/parse.c:1.432 Sat Nov 7 23:41:38 2020 +++ src/usr.bin/make/parse.c Sun Nov 8 02:37:22 2020 @@ -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 @@ Parse_IsVar(const char *p, VarAssign *ou ch = *p++; #ifdef SUNSHCMD - if (ch == ':' && strncmp(p, "sh", 2) == 0) { + if (ch == ':' && p[0] == 's' && p[1] == 'h') { p += 2; continue; }