diff options
author | Greg McGary <greg@mcgary.org> | 1999-03-28 21:33:32 +0000 |
---|---|---|
committer | Greg McGary <greg@mcgary.org> | 1999-03-28 21:33:32 +0000 |
commit | 7833458af45e21e07bec538ec3fbd87a5603ca50 (patch) | |
tree | ba3585ada5ed1b1e4c57033acf5aede14f981e7f /libidu/walker.c | |
parent | d4756b4ccc7f22845c0bbb73e6717ea7ed5c4a00 (diff) | |
download | idutils-7833458af45e21e07bec538ec3fbd87a5603ca50.tar.gz idutils-7833458af45e21e07bec538ec3fbd87a5603ca50.tar.bz2 idutils-7833458af45e21e07bec538ec3fbd87a5603ca50.zip |
* libidu/hash.c (hash_insert): hash_insert_at no longer
returns old contents, but rather the new slot address.
(hash_insert_at): Return slot address of inserted item.
* libidu/walker.c (get_member_file): return member.
(get_link_from_dirent, get_link_from_string): Conform
to new hash_insert_at API, where return value is slot
address of newly inserted item.
Diffstat (limited to 'libidu/walker.c')
-rw-r--r-- | libidu/walker.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/libidu/walker.c b/libidu/walker.c index d2c1940..80d1b59 100644 --- a/libidu/walker.c +++ b/libidu/walker.c @@ -388,7 +388,7 @@ get_member_file (struct file_link *flink) member = *slot; } member->mf_lang_args = args; - return *slot; + return member; } struct member_file * @@ -729,7 +729,8 @@ get_link_from_dirent (struct dirent *dirent, struct file_link *parent) new_link = make_link_from_dirent (dirent, parent); slot = (struct file_link **) hash_find_slot (&idh.idh_file_link_table, new_link); if (HASH_VACANT (*slot)) - hash_insert_at (&idh.idh_file_link_table, new_link, slot); + slot = (struct file_link **) hash_insert_at (&idh.idh_file_link_table, + new_link, slot); else obstack_free (&idh.idh_file_link_obstack, new_link); return *slot; @@ -744,7 +745,8 @@ get_link_from_string (char const *name, struct file_link *parent) new_link = make_link_from_string (name, parent); slot = (struct file_link **) hash_find_slot (&idh.idh_file_link_table, new_link); if (HASH_VACANT (*slot)) - hash_insert_at (&idh.idh_file_link_table, new_link, slot); + slot = (struct file_link **) hash_insert_at (&idh.idh_file_link_table, + new_link, slot); else obstack_free (&idh.idh_file_link_obstack, new_link); return *slot; |