summaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2018-11-13 14:51:36 +0000
committerMarc Espie <espie@cvs.openbsd.org>2018-11-13 14:51:36 +0000
commitbc8c8fd8b7dc1db39133d1e178018dd7113178e7 (patch)
treef3c4fb7664f1d2f4302116222eca7c1b1918d4d4 /usr.bin/make
parentebed7c2803cafd0f25cec2f5b8dfb566cdebf3f7 (diff)
commit again the cleanup part that didn't break anything
and was ok'd millert@
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/suff.c18
1 files changed, 6 insertions, 12 deletions
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c
index f7cc9ae3419..7d67e8c29db 100644
--- a/usr.bin/make/suff.c
+++ b/usr.bin/make/suff.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: suff.c,v 1.94 2018/10/08 19:52:53 espie Exp $ */
+/* $OpenBSD: suff.c,v 1.95 2018/11/13 14:51:35 espie Exp $ */
/* $NetBSD: suff.c,v 1.13 1996/11/06 17:59:25 christos Exp $ */
/*
@@ -180,7 +180,7 @@ static Suff *add_suffixi(const char *, const char *);
static void SuffInsert(Lst, Suff *);
static void SuffAddSrc(void *, void *);
-static int SuffRemoveSrc(Lst);
+static bool SuffRemoveSrc(Lst);
static void SuffAddLevel(Lst, Src *);
static Src *SuffFindThem(Lst, Lst);
static Src *SuffFindCmds(Src *, Lst);
@@ -730,21 +730,16 @@ SuffAddLevel(
/*-
*----------------------------------------------------------------------
* SuffRemoveSrc --
- * Free all src structures in list that don't have a reference count
+ * Free Src structure with a zero reference count in a list
*
- * Results:
- * Ture if an src was removed
- *
- * Side Effects:
- * The memory is free'd.
+ * returns true if a src was removed
*----------------------------------------------------------------------
*/
-static int
+static bool
SuffRemoveSrc(Lst l)
{
LstNode ln;
Src *s;
- int t = 0;
#ifdef DEBUG_SRC
printf("cleaning %lx: ", (unsigned long)l);
@@ -773,7 +768,6 @@ SuffRemoveSrc(Lst l)
#endif
Lst_Remove(l, ln);
free(s);
- t |= 1;
return true;
}
#ifdef DEBUG_SRC
@@ -785,7 +779,7 @@ SuffRemoveSrc(Lst l)
#endif
}
- return t;
+ return false;
}
/*-