diff options
author | pjd <pjd@FreeBSD.org> | 2015-01-30 13:03:36 +0000 |
---|---|---|
committer | pjd <pjd@FreeBSD.org> | 2015-01-30 13:03:36 +0000 |
commit | e4bf748e4c19149c9289f4e058de7cb0e2f7a044 (patch) | |
tree | cf85ee205988ab86c18ba6fc01c4d0f7c4883ac9 /lib/libnv | |
parent | 4db5826e21e3c8ba53437930311d99219ce0bf74 (diff) | |
download | FreeBSD-src-e4bf748e4c19149c9289f4e058de7cb0e2f7a044.zip FreeBSD-src-e4bf748e4c19149c9289f4e058de7cb0e2f7a044.tar.gz |
Make gcc happy.
Reported by: bz
Diffstat (limited to 'lib/libnv')
-rw-r--r-- | lib/libnv/nvlist.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/libnv/nvlist.c b/lib/libnv/nvlist.c index 5330c53..839f607 100644 --- a/lib/libnv/nvlist.c +++ b/lib/libnv/nvlist.c @@ -358,6 +358,7 @@ nvlist_dump(const nvlist_t *nvl, int fd) { const nvlist_t *tmpnvl; nvpair_t *nvp, *tmpnvp; + void *cookie; int level; level = 0; @@ -419,9 +420,11 @@ nvlist_dump(const nvlist_t *nvl, int fd) } while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) { - nvl = nvlist_get_parent(nvl, (void **)&nvp); + cookie = NULL; + nvl = nvlist_get_parent(nvl, &cookie); if (nvl == NULL) return; + nvp = cookie; level--; } } @@ -443,6 +446,7 @@ nvlist_size(const nvlist_t *nvl) { const nvlist_t *tmpnvl; const nvpair_t *nvp, *tmpnvp; + void *cookie; size_t size; NVLIST_ASSERT(nvl); @@ -469,9 +473,11 @@ nvlist_size(const nvlist_t *nvl) } while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) { - nvl = nvlist_get_parent(nvl, (void **)&nvp); + cookie = NULL; + nvl = nvlist_get_parent(nvl, &cookie); if (nvl == NULL) goto out; + nvp = cookie; } } @@ -587,6 +593,7 @@ nvlist_xpack(const nvlist_t *nvl, int64_t *fdidxp, size_t *sizep) size_t left, size; const nvlist_t *tmpnvl; nvpair_t *nvp, *tmpnvp; + void *cookie; NVLIST_ASSERT(nvl); @@ -655,9 +662,11 @@ nvlist_xpack(const nvlist_t *nvl, int64_t *fdidxp, size_t *sizep) return (NULL); } while ((nvp = nvlist_next_nvpair(nvl, nvp)) == NULL) { - nvl = nvlist_get_parent(nvl, (void **)&nvp); + cookie = NULL; + nvl = nvlist_get_parent(nvl, &cookie); if (nvl == NULL) goto out; + nvp = cookie; ptr = nvpair_pack_nvlist_up(ptr, &left); if (ptr == NULL) goto out; |