summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbenno <benno@openbsd.org>2017-08-12 22:09:54 +0000
committerbenno <benno@openbsd.org>2017-08-12 22:09:54 +0000
commit73094d71c45b05f98f0c65b2e395c410fb35c2e1 (patch)
tree1ebf64ef89940ad132544a8c8df01344c122a30e
parentFix iwm(4) channel reporting, broken by my unrelated tweak during commit of (diff)
downloadwireguard-openbsd-73094d71c45b05f98f0c65b2e395c410fb35c2e1.tar.xz
wireguard-openbsd-73094d71c45b05f98f0c65b2e395c410fb35c2e1.zip
fix the else case (i.e. LSA_IS_SCOPE_AS) where header could remain
uninitialized. found by clang. ok claudio@
-rw-r--r--usr.sbin/ospf6ctl/ospf6ctl.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.sbin/ospf6ctl/ospf6ctl.c b/usr.sbin/ospf6ctl/ospf6ctl.c
index fc0c433b976..9c36db0a46e 100644
--- a/usr.sbin/ospf6ctl/ospf6ctl.c
+++ b/usr.sbin/ospf6ctl/ospf6ctl.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ospf6ctl.c,v 1.45 2017/06/19 19:55:57 friehm Exp $ */
+/* $OpenBSD: ospf6ctl.c,v 1.46 2017/08/12 22:09:54 benno Exp $ */
/*
* Copyright (c) 2005 Claudio Jeker <claudio@openbsd.org>
@@ -585,6 +585,9 @@ show_database_head(struct in_addr aid, char *ifname, u_int16_t type)
if (asprintf(&header, "%s (Area %s Interface %s)", format,
inet_ntoa(aid), ifname) == -1)
err(1, NULL);
+ } else {
+ if (asprintf(&header, "%s", format) == -1)
+ err(1, NULL);
}
printf("\n%-15s %s\n\n", "", header);