summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-11-02 15:50:32 +0100
committerHolger Hans Peter Freyther <holger@moiji-mobile.com>2015-11-02 15:50:32 +0100
commit7921975989a1844546669a77ecdc9160fdef2282 (patch)
treea55505f68d001828d209a9cffdea6dfe9de43a0b /src
parent837e940627cd8dc469e65980b3b48c9539a55440 (diff)
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
Diffstat (limited to 'src')
-rw-r--r--src/stats.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stats.c b/src/stats.c
index 39247b6a..f979bdc8 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -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;