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 local variable in Dir_UpdateMTime



details:   https://anonhg.NetBSD.org/src/rev/c834ccde4d45
branches:  trunk
changeset: 957033:c834ccde4d45
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sat Nov 14 19:36:31 2020 +0000

description:
make(1): inline local variable in Dir_UpdateMTime

Now that the signature of cached_stats is cleaned up, the line is short
enough to contain the whole condition.

diffstat:

 usr.bin/make/dir.c |  8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)

diffs (36 lines):

diff -r abdf3898fb74 -r c834ccde4d45 usr.bin/make/dir.c
--- a/usr.bin/make/dir.c        Sat Nov 14 19:24:24 2020 +0000
+++ b/usr.bin/make/dir.c        Sat Nov 14 19:36:31 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: dir.c,v 1.208 2020/11/14 19:24:24 rillig Exp $ */
+/*     $NetBSD: dir.c,v 1.209 2020/11/14 19:36:31 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -134,7 +134,7 @@
 #include "job.h"
 
 /*     "@(#)dir.c      8.2 (Berkeley) 1/2/94"  */
-MAKE_RCSID("$NetBSD: dir.c,v 1.208 2020/11/14 19:24:24 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.209 2020/11/14 19:36:31 rillig Exp $");
 
 #define DIR_DEBUG0(text) DEBUG0(DIR, text)
 #define DIR_DEBUG1(fmt, arg1) DEBUG1(DIR, fmt, arg1)
@@ -1279,7 +1279,6 @@
 {
     char *fullName;
     struct cached_stat cst;
-    CachedStatsFlags flags;
 
     if (gn->type & OP_ARCHV) {
        Arch_UpdateMTime(gn);
@@ -1334,8 +1333,7 @@
     if (fullName == NULL)
        fullName = bmake_strdup(gn->name);
 
-    flags = recheck ? CST_UPDATE : CST_NONE;
-    if (cached_stats(fullName, &cst, flags) < 0) {
+    if (cached_stats(fullName, &cst, recheck ? CST_UPDATE : CST_NONE) < 0) {
        if (gn->type & OP_MEMBER) {
            if (fullName != gn->path)
                free(fullName);



Home | Main Index | Thread Index | Old Index