summaryrefslogtreecommitdiff
path: root/sbin
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2024-06-02 17:44:07 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2024-06-02 17:44:07 +0000
commitbc59ff72281a010ea3c79cbcae01cf890ec75c38 (patch)
tree52f8828afadd4e9e0d302c4f8cb18ea3b9bd5dd5 /sbin
parent113d018cb8cc1198996748df400f80965a298d2e (diff)
prev_plen is only accessed on the 2nd round through the loop.
Static analysers don't understand this. So give it a value to shut them up. Reported by jsg
Diffstat (limited to 'sbin')
-rw-r--r--sbin/dhcp6leased/parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/dhcp6leased/parse.y b/sbin/dhcp6leased/parse.y
index 2ed076a9b9d..da2a095fb00 100644
--- a/sbin/dhcp6leased/parse.y
+++ b/sbin/dhcp6leased/parse.y
@@ -1,4 +1,4 @@
-/* $OpenBSD: parse.y,v 1.3 2024/06/02 17:26:54 florian Exp $ */
+/* $OpenBSD: parse.y,v 1.4 2024/06/02 17:44:06 florian Exp $ */
/*
* Copyright (c) 2018, 2024 Florian Obser <florian@openbsd.org>
@@ -792,7 +792,7 @@ addressing_plan(struct iface_ia_conf *ia_conf)
{
struct iface_pd_conf *pd_conf;
uint64_t *p, lo_counter, hi_counter, lo_shift, hi_shift;
- int prev_plen;
+ int prev_plen = -1;
lo_counter = hi_counter = 0;