Always set "*success" in "ipxnet_addr_lookup()" before returning (thanks
and a tip of the hat to GCC 4.0's interprocedural data flow analysis for catching this one!). svn path=/trunk/; revision=14353
This commit is contained in:
parent
92b1092937
commit
3a8d46d8e9
|
@ -1513,8 +1513,10 @@ static guint ipxnet_addr_lookup(const gchar *name, gboolean *success)
|
|||
for (i = 0; i < HASHIPXNETSIZE; i++) {
|
||||
tp = table[i];
|
||||
while (tp) {
|
||||
if (strcmp(tp->name, name) == 0)
|
||||
if (strcmp(tp->name, name) == 0) {
|
||||
*success = TRUE;
|
||||
return tp->addr;
|
||||
}
|
||||
tp = tp->next;
|
||||
}
|
||||
}
|
||||
|
@ -1522,8 +1524,8 @@ static guint ipxnet_addr_lookup(const gchar *name, gboolean *success)
|
|||
/* not in hash table : performs a file lookup */
|
||||
|
||||
if ((ipxnet = get_ipxnetbyname(name)) == NULL) {
|
||||
*success = FALSE;
|
||||
return 0;
|
||||
*success = FALSE;
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* add new entry in hash table */
|
||||
|
|
Loading…
Reference in New Issue