diff options
author | Toomas Soome <tsoome@me.com> | 2018-05-30 12:38:16 +0300 |
---|---|---|
committer | Hans Rosenfeld <hans.rosenfeld@joyent.com> | 2018-06-04 10:35:16 +0200 |
commit | ea4ea50f064c5468142b24627acad09a41f060cb (patch) | |
tree | edd308866e93219b4b0973553d9764cc1dfe8c30 /usr/src/tools/ctf/cvt/iidesc.c | |
parent | a19d2449c7801a22d6c8370a965dab3d16c77925 (diff) | |
download | illumos-gate-ea4ea50f064c5468142b24627acad09a41f060cb.tar.gz |
9565 ctf: cast between incompatible function types
Reviewed by: Yuri Pankov <yuripv@yuripv.net>
Reviewed by: Andrew Stormont <andyjstormont@gmail.com>
Reviewed by: John Levon <john.levon@joyent.com>
Approved by: Hans Rosenfeld <rosenfeld@grumpf.hope-2000.org>
Diffstat (limited to 'usr/src/tools/ctf/cvt/iidesc.c')
-rw-r--r-- | usr/src/tools/ctf/cvt/iidesc.c | 23 |
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) { |