• Home
  • Raw
  • Download

Lines Matching full:bucket

119     HashBucketPtr bucket;  in drmHashDestroy()  local
126 for (bucket = table->buckets[i]; bucket;) { in drmHashDestroy()
127 next = bucket->next; in drmHashDestroy()
128 drmFree(bucket); in drmHashDestroy()
129 bucket = next; in drmHashDestroy()
136 /* Find the bucket and organize the list so that this bucket is at the
144 HashBucketPtr bucket; in HashFind() local
148 for (bucket = table->buckets[hash]; bucket; bucket = bucket->next) { in HashFind()
149 if (bucket->key == key) { in HashFind()
152 prev->next = bucket->next; in HashFind()
153 bucket->next = table->buckets[hash]; in HashFind()
154 table->buckets[hash] = bucket; in HashFind()
159 return bucket; in HashFind()
161 prev = bucket; in HashFind()
170 HashBucketPtr bucket; in drmHashLookup() local
174 bucket = HashFind(table, key, NULL); in drmHashLookup()
175 if (!bucket) return 1; /* Not found */ in drmHashLookup()
176 *value = bucket->value; in drmHashLookup()
183 HashBucketPtr bucket; in drmHashInsert() local
190 bucket = drmMalloc(sizeof(*bucket)); in drmHashInsert()
191 if (!bucket) return -1; /* Error */ in drmHashInsert()
192 bucket->key = key; in drmHashInsert()
193 bucket->value = value; in drmHashInsert()
194 bucket->next = table->buckets[hash]; in drmHashInsert()
195 table->buckets[hash] = bucket; in drmHashInsert()
203 HashBucketPtr bucket; in drmHashDelete() local
207 bucket = HashFind(table, key, &hash); in drmHashDelete()
209 if (!bucket) return 1; /* Not found */ in drmHashDelete()
211 table->buckets[hash] = bucket->next; in drmHashDelete()
212 drmFree(bucket); in drmHashDelete()