Lines Matching full:bucket

124     HashBucketPtr bucket;  in drmHashDestroy()  local
131 for (bucket = table->buckets[i]; bucket;) { in drmHashDestroy()
132 next = bucket->next; in drmHashDestroy()
133 drmFree(bucket); in drmHashDestroy()
134 bucket = next; in drmHashDestroy()
141 /* Find the bucket and organize the list so that this bucket is at the
149 HashBucketPtr bucket; in HashFind() local
153 for (bucket = table->buckets[hash]; bucket; bucket = bucket->next) { in HashFind()
154 if (bucket->key == key) { in HashFind()
157 prev->next = bucket->next; in HashFind()
158 bucket->next = table->buckets[hash]; in HashFind()
159 table->buckets[hash] = bucket; in HashFind()
164 return bucket; in HashFind()
166 prev = bucket; in HashFind()
175 HashBucketPtr bucket; in drmHashLookup() local
179 bucket = HashFind(table, key, NULL); in drmHashLookup()
180 if (!bucket) return 1; /* Not found */ in drmHashLookup()
181 *value = bucket->value; in drmHashLookup()
188 HashBucketPtr bucket; in drmHashInsert() local
195 bucket = drmMalloc(sizeof(*bucket)); in drmHashInsert()
196 if (!bucket) return -1; /* Error */ in drmHashInsert()
197 bucket->key = key; in drmHashInsert()
198 bucket->value = value; in drmHashInsert()
199 bucket->next = table->buckets[hash]; in drmHashInsert()
200 table->buckets[hash] = bucket; in drmHashInsert()
208 HashBucketPtr bucket; in drmHashDelete() local
212 bucket = HashFind(table, key, &hash); in drmHashDelete()
214 if (!bucket) return 1; /* Not found */ in drmHashDelete()
216 table->buckets[hash] = bucket->next; in drmHashDelete()
217 drmFree(bucket); in drmHashDelete()