luci-lib-ip: explicitly initialize address scope value
authorJo-Philipp Wich <jo@mein.io>
Thu, 23 Jan 2020 11:31:36 +0000 (12:31 +0100)
committerJo-Philipp Wich <jo@mein.io>
Thu, 23 Jan 2020 11:37:40 +0000 (12:37 +0100)
commitb349428e167c5c129ce352aa6d391fea85122fd4
tree379e17fe0f7877ae0f2fd4c78a5b7ff8c2e2599d
parent421791dcad7572e5b67f10b11bc9c7e17b04cd92
luci-lib-ip: explicitly initialize address scope value

Explicitly initialize the address scope value to zero in parse_cidr() and
L_setaddr() to avoid stray scope identifiers getting added when formatting
the address object as string.

Fixes: 1d2b4c777 ("luci-lib-ip: support scoped IPv6 addresses")
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
(cherry picked from commit 5cbbfaba3e2935b61b42fe339e78b3ff300c1619)
libs/luci-lib-ip/src/ip.c