diff options
author | 2017-08-12 22:09:54 +0000 | |
---|---|---|
committer | 2017-08-12 22:09:54 +0000 | |
commit | 73094d71c45b05f98f0c65b2e395c410fb35c2e1 (patch) | |
tree | 1ebf64ef89940ad132544a8c8df01344c122a30e | |
parent | Fix iwm(4) channel reporting, broken by my unrelated tweak during commit of (diff) | |
download | wireguard-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.c | 5 |
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); |