From 7921975989a1844546669a77ecdc9160fdef2282 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 2 Nov 2015 15:50:32 +0100 Subject: 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 --- src/stats.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3