mirror of
https://github.com/opnsense/src.git
synced 2026-04-24 15:48:48 -04:00
hash_search() has changed its calling semantics somewhat - bring
libforms back into sync.
This commit is contained in:
parent
3ea2f344e0
commit
afc1e28e76
1 changed files with 8 additions and 4 deletions
|
|
@ -45,6 +45,12 @@ bind_tuple(hash_table *htable, char *name,
|
|||
{
|
||||
struct Tuple *tuple;
|
||||
|
||||
/* First check to see if we've been bound in already */
|
||||
if (hash_search(htable, tuple->name, NULL, NULL)) {
|
||||
warn("Duplicate tuple name, %s, skipping", name);
|
||||
return (ST_ERROR);
|
||||
}
|
||||
|
||||
tuple = malloc(sizeof (struct Tuple));
|
||||
if (!tuple) {
|
||||
warn("Couldn't allocate memory for new tuple");
|
||||
|
|
@ -55,10 +61,8 @@ bind_tuple(hash_table *htable, char *name,
|
|||
tuple->type = type;
|
||||
tuple->addr = fn;
|
||||
|
||||
if (hash_search(htable, tuple->name, tuple, NULL)) {
|
||||
warn("Duplicate tuple name, %s, skipping", name);
|
||||
return (ST_ERROR);
|
||||
}
|
||||
/* Insert it */
|
||||
hash_search(htable, tuple->name, tuple, NULL);
|
||||
|
||||
#ifdef DEBUG
|
||||
debug_dump_table(htable);
|
||||
|
|
|
|||
Loading…
Reference in a new issue