Initialize error value ta_lookup_kfib() by default to please compiler.
This commit is contained in:
parent
6e757e4210
commit
3f95da300d
@ -3814,6 +3814,7 @@ ta_lookup_kfib(struct table_info *ti, void *key, uint32_t keylen,
|
||||
#endif
|
||||
int error;
|
||||
|
||||
error = ENOENT;
|
||||
#ifdef INET
|
||||
if (keylen == 4) {
|
||||
in.s_addr = *(in_addr_t *)key;
|
||||
@ -3826,9 +3827,6 @@ ta_lookup_kfib(struct table_info *ti, void *key, uint32_t keylen,
|
||||
error = fib6_lookup_nh_basic(ti->data,
|
||||
(struct in6_addr *)key, 0, 0, 0, &nh6);
|
||||
#endif
|
||||
#if !defined(INET6) && !defined(INET)
|
||||
error = ENOENT;
|
||||
#endif
|
||||
|
||||
if (error != 0)
|
||||
return (0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user