Lines Matching full:np
86 * Destroy the string node [np].
89 _zed_strings_node_destroy(zed_strings_node_t *np) in _zed_strings_node_destroy() argument
91 if (!np) in _zed_strings_node_destroy()
94 if (np->key) { in _zed_strings_node_destroy()
95 if (np->key != np->val) in _zed_strings_node_destroy()
96 free(np->key); in _zed_strings_node_destroy()
97 np->key = NULL; in _zed_strings_node_destroy()
99 if (np->val) { in _zed_strings_node_destroy()
100 free(np->val); in _zed_strings_node_destroy()
101 np->val = NULL; in _zed_strings_node_destroy()
103 free(np); in _zed_strings_node_destroy()
114 zed_strings_node_t *np; in _zed_strings_node_create() local
118 np = calloc(1, sizeof (*np)); in _zed_strings_node_create()
119 if (!np) in _zed_strings_node_create()
122 np->val = strdup(val); in _zed_strings_node_create()
123 if (!np->val) in _zed_strings_node_create()
127 np->key = strdup(key); in _zed_strings_node_create()
128 if (!np->key) in _zed_strings_node_create()
131 np->key = np->val; in _zed_strings_node_create()
133 return (np); in _zed_strings_node_create()
136 _zed_strings_node_destroy(np); in _zed_strings_node_create()
147 zed_strings_node_t *np; in zed_strings_destroy() local
153 while ((np = avl_destroy_nodes(&zsp->tree, &cookie))) in zed_strings_destroy()
154 _zed_strings_node_destroy(np); in zed_strings_destroy()