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:
Holger Hans Peter Freyther 2015-11-02 15:50:32 +01:00
parent 837e940627
commit 7921975989
1 changed files with 1 additions and 1 deletions

View File

@ -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;