Lines Matching refs:node
47 hash_node_t *node;
49 node = (hash_node_t *)malloc(sizeof (hash_node_t));
50 if (!node) {
53 node->key = strdup(key);
54 node->data = data;
61 node->next = hash[ index ];
62 hash[ index ] = node;
71 * Searches the hash to find a node.
75 * pointer to node if found.
81 hash_node_t *node;
84 node = hash[ index ];
85 while (node) {
86 if (strcmp(node->key, key) == 0)
87 return (node->data);
88 node = node->next;
97 hash_node_t *node, *prev;
106 node = hash[ index ];
107 retval = node->data;
109 free(node->key);
110 free(node);
114 node = prev->next;
115 while (node && (strcmp(node->key, key) != 0)) {
116 prev = node;
117 node = node->next;
121 if (node) {
122 prev->next = node->next;
123 retval = node->data;
124 free(node->key);
125 free(node);