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:
Guy Harris 2005-05-12 02:50:27 +00:00
parent 92b1092937
commit 3a8d46d8e9
1 changed files with 5 additions and 3 deletions

View File

@ -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 */