summaryrefslogtreecommitdiff
path: root/usr/src/tools/ctf/cvt/iidesc.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr/src/tools/ctf/cvt/iidesc.c')
-rw-r--r--usr/src/tools/ctf/cvt/iidesc.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/usr/src/tools/ctf/cvt/iidesc.c b/usr/src/tools/ctf/cvt/iidesc.c
index b6b9a0c7f2..0d75e3f852 100644
--- a/usr/src/tools/ctf/cvt/iidesc.c
+++ b/usr/src/tools/ctf/cvt/iidesc.c
@@ -23,8 +23,6 @@
* Use is subject to license terms.
*/
-#pragma ident "%Z%%M% %I% %E% SMI"
-
/*
* Routines for manipulating iidesc_t structures
*/
@@ -99,7 +97,7 @@ iidesc_add(hash_t *hash, iidesc_t *new)
bcopy(new, old, sizeof (*old));
bcopy(&tmp, new, sizeof (*new));
- iidesc_free(new, NULL);
+ iidesc_free(new);
return;
}
@@ -151,17 +149,22 @@ iidesc_dup_rename(iidesc_t *src, char const *name, char const *owner)
/*ARGSUSED*/
void
-iidesc_free(iidesc_t *idp, void *private)
+iidesc_free_cb(void *ptr, void *private)
{
- if (idp->ii_name)
- free(idp->ii_name);
- if (idp->ii_nargs)
- free(idp->ii_args);
- if (idp->ii_owner)
- free(idp->ii_owner);
+ iidesc_t *idp = ptr;
+
+ free(idp->ii_name);
+ free(idp->ii_args);
+ free(idp->ii_owner);
free(idp);
}
+void
+iidesc_free(iidesc_t *idp)
+{
+ iidesc_free_cb(idp, NULL);
+}
+
int
iidesc_dump(iidesc_t *ii)
{