aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>1998-04-26 09:44:48 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>1998-04-26 09:44:48 +0000
commit64400b18cc7afb8e553c07e4e0070aacfa1e8ea5 (patch)
tree057ace2d5950fe5e984094a2933aa58e4f8f088a /usr.bin/make
parent29c03682fa67281c1fc81c3cf38cf98229c170d8 (diff)
Notes
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/suff.c28
1 files changed, 7 insertions, 21 deletions
diff --git a/usr.bin/make/suff.c b/usr.bin/make/suff.c
index 5d3cf9aa88a0..040f9c560852 100644
--- a/usr.bin/make/suff.c
+++ b/usr.bin/make/suff.c
@@ -35,7 +35,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
- * $Id$
+ * $Id: suff.c,v 1.8 1997/02/22 19:27:23 peter Exp $
*/
#ifndef lint
@@ -160,7 +160,6 @@ static int SuffSuffIsSuffixP __P((ClientData, ClientData));
static int SuffSuffHasNameP __P((ClientData, ClientData));
static int SuffSuffIsPrefix __P((ClientData, ClientData));
static int SuffGNHasNameP __P((ClientData, ClientData));
-static void SuffUnRef __P((ClientData, ClientData));
static void SuffFree __P((ClientData));
static void SuffInsert __P((Lst, Suff *));
static void SuffRemove __P((Lst, Suff *));
@@ -327,20 +326,6 @@ SuffGNHasNameP (gn, name)
/*********** Maintenance Functions ************/
-static void
-SuffUnRef(lp, sp)
- ClientData lp;
- ClientData sp;
-{
- Lst l = (Lst) lp;
-
- LstNode ln = Lst_Member(l, sp);
- if (ln != NILLNODE) {
- Lst_Remove(l, ln);
- ((Suff *) sp)->refCount--;
- }
-}
-
/*-
*-----------------------------------------------------------------------
* SuffFree --
@@ -383,8 +368,7 @@ SuffFree (sp)
* None
*
* Side Effects:
- * The reference count for the suffix is decremented and the
- * suffix is possibly freed
+ * The reference count for the suffix is decremented
*-----------------------------------------------------------------------
*/
static void
@@ -392,9 +376,11 @@ SuffRemove(l, s)
Lst l;
Suff *s;
{
- SuffUnRef((ClientData) l, (ClientData) s);
- if (s->refCount == 0)
- SuffFree((ClientData) s);
+ LstNode ln = Lst_Member(l, (ClientData)s);
+ if (ln != NILLNODE) {
+ Lst_Remove(l, ln);
+ s->refCount--;
+ }
}
/*-