Print this page
6447 handful of nvpair cleanups

*** 1623,1632 **** --- 1623,1634 ---- *ep = NULL; if ((nvl == NULL) || (name == NULL)) return (EINVAL); + sepp = NULL; + idx = 0; /* step through components of name */ for (np = name; np && *np; np = sepp) { /* ensure unique names */ if (!(nvl->nvl_nvflag & NV_UNIQUE_NAME)) return (ENOTSUP);
*** 2380,2390 **** * will be to remove the kmflag from nvlist_pack(), but we will * not change the interface. */ nv_priv_init(&nvpriv, nva, 0); ! if (err = nvlist_size(nvl, &alloc_size, encoding)) return (err); if ((buf = nv_mem_zalloc(&nvpriv, alloc_size)) == NULL) return (ENOMEM); --- 2382,2392 ---- * will be to remove the kmflag from nvlist_pack(), but we will * not change the interface. */ nv_priv_init(&nvpriv, nva, 0); ! if ((err = nvlist_size(nvl, &alloc_size, encoding))) return (err); if ((buf = nv_mem_zalloc(&nvpriv, alloc_size)) == NULL) return (ENOMEM);