mirror of https://gerrit.osmocom.org/libosmocore
stats: Do not assign the wrong addresss
we need to put the default value into inaddr and not put a 32bit value into the addr pointer. Spotted by cppcheck: [src/stats.c:231]: (error) Uninitialized variable: inaddr
This commit is contained in:
parent
837e940627
commit
7921975989
|
@ -225,7 +225,7 @@ int osmo_stats_reporter_set_local_addr(struct osmo_stats_reporter *srep, const c
|
|||
if (rc <= 0)
|
||||
return -EINVAL;
|
||||
} else {
|
||||
addr = INADDR_ANY;
|
||||
inaddr.s_addr = INADDR_ANY;
|
||||
}
|
||||
|
||||
sock_addr->sin_addr = inaddr;
|
||||
|
|
Loading…
Reference in New Issue