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

Function nvlist_move_descriptor

freebsd/contrib/libnv/nvlist.c:1717–1735  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1715
1716#ifndef _KERNEL
1717void
1718nvlist_move_descriptor(nvlist_t *nvl, const char *name, int value)
1719{
1720 nvpair_t *nvp;
1721
1722 if (nvlist_error(nvl) != 0) {
1723 close(value);
1724 ERRNO_SET(nvlist_error(nvl));
1725 return;
1726 }
1727
1728 nvp = nvpair_move_descriptor(name, value);
1729 if (nvp == NULL) {
1730 nvl->nvl_error = ERRNO_OR_DEFAULT(ENOMEM);
1731 ERRNO_SET(nvl->nvl_error);
1732 } else {
1733 (void)nvlist_move_nvpair(nvl, nvp);
1734 }
1735}
1736#endif
1737
1738void

Callers

nothing calls this directly

Calls 3

nvlist_errorFunction · 0.85
nvpair_move_descriptorFunction · 0.85
closeFunction · 0.50

Tested by

no test coverage detected