Skip to content

Commit bb66b29

Browse files
PiotrZierhofferioannisg
authored andcommitted
net: ip: ipv6_nbr: Fix uninitialized variable in ipv6_nbr
Setting it to UINT32_MAX, as it is subsequently overwritten with MIN(oldest, something_else). Signed-off-by: Piotr Zierhoffer <[email protected]>
1 parent 1df9a2e commit bb66b29

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

subsys/net/ip/ipv6_nbr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -499,7 +499,7 @@ static void ipv6_nd_remove_old_stale_nbr(void)
499499
struct net_nbr *nbr = NULL;
500500
struct net_ipv6_nbr_data *data = NULL;
501501
int nbr_idx = -1;
502-
u32_t oldest;
502+
u32_t oldest = UINT32_MAX;
503503
int i;
504504

505505
k_sem_take(&nbr_lock, K_FOREVER);

0 commit comments

Comments
 (0)