summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2020-04-20 17:25:24 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2020-04-20 17:25:24 +0000
commit72e66fd5294a28eba394538c9fd30ee3f381093b (patch)
tree55d3d3f93d33eda0fd2fb15a20a04322b92170b0
parent4939a3471828b5ff262c2ad7b589f39722f04b72 (diff)
Don't return stack garbage even if it is going to be
ignored. Initialize 'error' to 0. CID 1483380 ok mpi@
-rw-r--r--sys/net/route.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/route.c b/sys/net/route.c
index f1e06722e15..083f5f3a594 100644
--- a/sys/net/route.c
+++ b/sys/net/route.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: route.c,v 1.392 2020/04/15 14:04:18 mpi Exp $ */
+/* $OpenBSD: route.c,v 1.393 2020/04/20 17:25:23 krw Exp $ */
/* $NetBSD: route.c,v 1.14 1996/02/13 22:00:46 christos Exp $ */
/*
@@ -1668,7 +1668,7 @@ rt_if_track(struct ifnet *ifp)
{
unsigned int rtableid;
struct rtentry *rt = NULL;
- int i, error;
+ int i, error = 0;
for (rtableid = 0; rtableid < rtmap_limit; rtableid++) {
/* skip rtables that are not in the rdomain of the ifp */