Module Name: src
Committed By: rillig
Date: Wed Feb 3 06:58:22 UTC 2021
Modified Files:
src/usr.bin/make: util.c
Log Message:
make: fix compiler warning about signedness in comparison
To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/usr.bin/make/util.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/util.c
diff -u src/usr.bin/make/util.c:1.74 src/usr.bin/make/util.c:1.75
--- src/usr.bin/make/util.c:1.74 Mon Feb 1 19:46:58 2021
+++ src/usr.bin/make/util.c Wed Feb 3 06:58:22 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.74 2021/02/01 19:46:58 rillig Exp $ */
+/* $NetBSD: util.c,v 1.75 2021/02/03 06:58:22 rillig Exp $ */
/*
* Missing stuff from OS's
@@ -15,7 +15,7 @@
#include "make.h"
-MAKE_RCSID("$NetBSD: util.c,v 1.74 2021/02/01 19:46:58 rillig Exp $");
+MAKE_RCSID("$NetBSD: util.c,v 1.75 2021/02/03 06:58:22 rillig Exp $");
#if !defined(MAKE_NATIVE) && !defined(HAVE_STRERROR)
extern int errno, sys_nerr;
@@ -45,7 +45,7 @@ findenv(const char *name, int *offset)
len = strlen(name);
for (i = 0; (q = environ[i]); i++) {
p = strchr(q, '=');
- if (p == NULL || p - q != len)
+ if (p == NULL || (size_t)(p - q) != len)
continue;
if (strncmp(name, q, len) == 0) {
*offset = i;