summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-01-02 13:21:32 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-01-02 13:21:32 +0000
commitd5931c626eb34d56cde60d43743c4d9a47ece098 (patch)
tree449c962f2b24369d304255047be214a4290244ad /usr.bin
parent092c83a2f82d484410f825d5ffd8d2b3d07020e8 (diff)
VarDelete is no longer used by list functions, so let it do type-checking
correctly.
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/make/var.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/usr.bin/make/var.c b/usr.bin/make/var.c
index 4e3c84fd838..607486e6f77 100644
--- a/usr.bin/make/var.c
+++ b/usr.bin/make/var.c
@@ -1,5 +1,5 @@
/* $OpenPackages$ */
-/* $OpenBSD: var.c,v 1.60 2006/01/20 23:10:19 espie Exp $ */
+/* $OpenBSD: var.c,v 1.61 2007/01/02 13:21:31 espie Exp $ */
/* $NetBSD: var.c,v 1.18 1997/03/18 19:24:46 christos Exp $ */
/*
@@ -176,7 +176,7 @@ static int quick_lookup(const char *, const char **, uint32_t *);
static Var *varfind(const char *, const char *, SymTable *, int, int, uint32_t);
static Var *VarFindi(const char *, const char *, SymTable *, int);
static Var *VarAdd(const char *, const char *, uint32_t, const char *, GSymT *);
-static void VarDelete(void *);
+static void VarDelete(Var *);
static void VarPrintVar(Var *);
static const char *context_name(GSymT *);
static Var *new_var(const char *, const char *, const char *);
@@ -588,10 +588,8 @@ VarAdd(const char *name, const char *ename, uint32_t k, const char *val,
*-----------------------------------------------------------------------
*/
static void
-VarDelete(void *vp)
+VarDelete(Var *v)
{
- Var *v = (Var *)vp;
-
if ((v->flags & VAR_DUMMY) == 0)
Buf_Destroy(&(v->val));
free(v);