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): fix a few lint warnings
details: https://anonhg.NetBSD.org/src/rev/697fdad570e6
branches: trunk
changeset: 948278:697fdad570e6
user: rillig <rillig%NetBSD.org@localhost>
date: Wed Dec 23 14:13:49 2020 +0000
description:
make(1): fix a few lint warnings
diffstat:
usr.bin/make/main.c | 11 ++++++-----
usr.bin/make/parse.c | 6 +++---
2 files changed, 9 insertions(+), 8 deletions(-)
diffs (60 lines):
diff -r 800beea51248 -r 697fdad570e6 usr.bin/make/main.c
--- a/usr.bin/make/main.c Wed Dec 23 14:05:32 2020 +0000
+++ b/usr.bin/make/main.c Wed Dec 23 14:13:49 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.501 2020/12/23 13:50:54 rillig Exp $ */
+/* $NetBSD: main.c,v 1.502 2020/12/23 14:13:49 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990, 1993
@@ -109,7 +109,7 @@
#include "trace.h"
/* "@(#)main.c 8.3 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: main.c,v 1.501 2020/12/23 13:50:54 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.502 2020/12/23 14:13:49 rillig Exp $");
#if defined(MAKE_NATIVE) && !defined(lint)
__COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
"The Regents of the University of California. "
@@ -1147,10 +1147,11 @@
if (argv0[0] != '/' && strchr(argv0, '/') != NULL) {
char pathbuf[MAXPATHLEN];
- const char *abs = cached_realpath(argv0, pathbuf);
+ const char *abspath = cached_realpath(argv0, pathbuf);
struct stat st;
- if (abs != NULL && abs[0] == '/' && stat(make, &st) == 0)
- make = abs;
+ if (abspath != NULL && abspath[0] == '/' &&
+ stat(make, &st) == 0)
+ make = abspath;
}
Var_Set("MAKE", make, VAR_GLOBAL);
diff -r 800beea51248 -r 697fdad570e6 usr.bin/make/parse.c
--- a/usr.bin/make/parse.c Wed Dec 23 14:05:32 2020 +0000
+++ b/usr.bin/make/parse.c Wed Dec 23 14:13:49 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: parse.c,v 1.515 2020/12/23 13:50:54 rillig Exp $ */
+/* $NetBSD: parse.c,v 1.516 2020/12/23 14:13:49 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.515 2020/12/23 13:50:54 rillig Exp $");
+MAKE_RCSID("$NetBSD: parse.c,v 1.516 2020/12/23 14:13:49 rillig Exp $");
/* types and constants */
@@ -2204,7 +2204,7 @@
const char *suff;
SearchPath *suffPath = NULL;
- if ((suff = strrchr(file, '.'))) {
+ if ((suff = strrchr(file, '.')) != NULL) {
suffPath = Suff_GetPath(suff);
if (suffPath != NULL)
fullname = Dir_FindFile(file, suffPath);
Home |
Main Index |
Thread Index |
Old Index