Changeset c7ec94a4 in mainline for generic/src/adt
- Timestamp:
- 2006-02-06T14:18:28Z (20 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- f5935ed
- Parents:
- 214f5bb
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
generic/src/adt/hash_table.c
r214f5bb rc7ec94a4 68 68 * @param hey Array of all keys necessary to compute hash index. 69 69 * @param item Item to be inserted into the hash table. 70 *71 * @return true on success, false if the keys were already present in the hash table.72 70 */ 73 boolhash_table_insert(hash_table_t *h, __native key[], link_t *item)71 void hash_table_insert(hash_table_t *h, __native key[], link_t *item) 74 72 { 75 73 index_t chain; … … 81 79 ASSERT(chain < h->entries); 82 80 83 if (hash_table_find(h, key)) {84 /*85 * The hash table is not redundant.86 * Signal failure on return.87 */88 return false;89 }90 91 81 list_append(item, &h->entry[chain]); 92 return true;93 82 } 94 83
Note:
See TracChangeset
for help on using the changeset viewer.