aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Sperling <ssperling@sysmocom.de>2018-11-22 08:12:28 +0100
committerStefan Sperling <ssperling@sysmocom.de>2018-11-22 13:16:50 +0000
commit7327360d1037ea93f1d304344b40bae03fd589fa (patch)
tree4b70815730f015c8a504ffb8a103de620d7fdacd
parente405c2f196ea77ba74438ec90545fda56f8f0444 (diff)
initialize local variable addr in ippool_new()
Coverity points out that addr.len was potentially being used uninitialized, via calls to in46a_inc(&addr). Change-Id: Idb67394e5f4c2072380a33f46c848d92c4317245 Related: CID#174189
-rw-r--r--lib/ippool.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ippool.c b/lib/ippool.c
index 36121ee..6f3d06e 100644
--- a/lib/ippool.c
+++ b/lib/ippool.c
@@ -202,7 +202,7 @@ int ippool_new(struct ippool_t **this, const struct in46_prefix *dyn, const stru
/* Parse only first instance of pool for now */
int i;
- struct in46_addr addr;
+ struct in46_addr addr = { 0 };
size_t addrprefixlen;
struct in46_addr stataddr;
size_t stataddrprefixlen;