Lines Matching defs:entry
84 static strhash_entry_t *find_entry(strhash_entry_t *entry, const char *key,
143 strhash_entry_t *entry;
150 if ((entry = find_entry(hash->bins[h_index], key, h)) != NULL) {
152 entry->value = value;
154 /* Create new entry. */
155 if ((entry = new_entry(key, value)) == NULL) {
159 entry->next = hash->bins[h_index];
160 hash->bins[h_index] = entry;
179 strhash_entry_t *entry;
184 entry = find_entry(hash->bins[h % hash->nbins], key, h);
185 if (entry == NULL)
188 *valuep = entry->value;
215 find_entry(strhash_entry_t *entry, const char *key, unsigned long hash) {
218 while (entry != NULL) {
219 if (entry->hash_value == hash && strcmp(key, entry->key) == 0)
220 return (entry);
221 entry = entry->next;
228 strhash_entry_t *entry;
234 if ((entry = malloc(sizeof(strhash_entry_t) + len)) == NULL) {
237 entry->next = NULL;
238 entry->hash_value = hash_value(key);
239 entry->key = (char *)(entry + 1);
240 (void)strcpy(entry->key, key);
241 entry->value = value;
243 return (entry);