MCPcopy Create free account
hub / github.com/F-Stack/f-stack / nvlist_move_string

Function nvlist_move_string

freebsd/contrib/libnv/nvlist.c:1675–1693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1673}
1674
1675void
1676nvlist_move_string(nvlist_t *nvl, const char *name, char *value)
1677{
1678 nvpair_t *nvp;
1679
1680 if (nvlist_error(nvl) != 0) {
1681 nv_free(value);
1682 ERRNO_SET(nvlist_error(nvl));
1683 return;
1684 }
1685
1686 nvp = nvpair_move_string(name, value);
1687 if (nvp == NULL) {
1688 nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM);
1689 ERRNO_SET(nvl->nvl_error);
1690 } else {
1691 (void)nvlist_move_nvpair(nvl, nvp);
1692 }
1693}
1694
1695void
1696nvlist_move_nvlist(nvlist_t *nvl, const char *name, nvlist_t *value)

Callers

nothing calls this directly

Calls 2

nvlist_errorFunction · 0.85
nvpair_move_stringFunction · 0.85

Tested by

no test coverage detected