commit | 7921975989a1844546669a77ecdc9160fdef2282 | [log] [tgz] |
---|---|---|
author | Holger Hans Peter Freyther <holger@moiji-mobile.com> | Mon Nov 02 15:50:32 2015 +0100 |
committer | Holger Hans Peter Freyther <holger@moiji-mobile.com> | Mon Nov 02 15:50:32 2015 +0100 |
tree | a55505f68d001828d209a9cffdea6dfe9de43a0b | |
parent | 837e940627cd8dc469e65980b3b48c9539a55440 [diff] [blame] |
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
diff --git a/src/stats.c b/src/stats.c index 39247b6..f979bdc 100644 --- a/src/stats.c +++ b/src/stats.c
@@ -225,7 +225,7 @@ if (rc <= 0) return -EINVAL; } else { - addr = INADDR_ANY; + inaddr.s_addr = INADDR_ANY; } sock_addr->sin_addr = inaddr;