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): move CachedDir_Destroy up to the relat...
details: https://anonhg.NetBSD.org/src/rev/f71764898be6
branches: trunk
changeset: 957482:f71764898be6
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Nov 29 16:04:34 2020 +0000
description:
make(1): move CachedDir_Destroy up to the related functions
diffstat:
usr.bin/make/dir.c | 25 ++++++++++++-------------
1 files changed, 12 insertions(+), 13 deletions(-)
diffs (60 lines):
diff -r 6571fa90ee5b -r f71764898be6 usr.bin/make/dir.c
--- a/usr.bin/make/dir.c Sun Nov 29 15:58:37 2020 +0000
+++ b/usr.bin/make/dir.c Sun Nov 29 16:04:34 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir.c,v 1.238 2020/11/29 15:58:37 rillig Exp $ */
+/* $NetBSD: dir.c,v 1.239 2020/11/29 16:04:34 rillig Exp $ */
/*
* Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -136,7 +136,7 @@
#include "job.h"
/* "@(#)dir.c 8.2 (Berkeley) 1/2/94" */
-MAKE_RCSID("$NetBSD: dir.c,v 1.238 2020/11/29 15:58:37 rillig Exp $");
+MAKE_RCSID("$NetBSD: dir.c,v 1.239 2020/11/29 16:04:34 rillig Exp $");
#define DIR_DEBUG0(text) DEBUG0(DIR, text)
#define DIR_DEBUG1(fmt, arg1) DEBUG1(DIR, fmt, arg1)
@@ -286,7 +286,6 @@
static HashTable lmtimes; /* same as mtimes but for lstat */
-static void CachedDir_Destroy(CachedDir *);
static void OpenDirs_Remove(OpenDirs *, const char *);
@@ -332,6 +331,16 @@
dir->refCount, dir->name);
}
+/* Nuke a directory descriptor, if it is no longer used. */
+static void
+CachedDir_Destroy(CachedDir *dir)
+{
+ CachedDir_Unref(dir);
+
+ if (dir->refCount == 0)
+ CachedDir_Free0(dir);
+}
+
static void
OpenDirs_Init(OpenDirs *odirs)
{
@@ -1614,16 +1623,6 @@
return Buf_Destroy(&buf, FALSE);
}
-/* Nuke a directory descriptor, if it is no longer used. */
-static void
-CachedDir_Destroy(CachedDir *dir)
-{
- CachedDir_Unref(dir);
-
- if (dir->refCount == 0)
- CachedDir_Free0(dir);
-}
-
/* Free the search path and all directories mentioned in it. */
void
SearchPath_Free(SearchPath *path)
Home |
Main Index |
Thread Index |
Old Index