summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2009-11-12 22:19:33 +0000
committerclaudio <claudio@openbsd.org>2009-11-12 22:19:33 +0000
commita4bfea9e1705b19d1b0dd556483cbf0258155cf2 (patch)
treeec7727e65516e1450a76b94576354a463121d326
parentfix comparison, from NetBSD PR/42177 (diff)
downloadwireguard-openbsd-a4bfea9e1705b19d1b0dd556483cbf0258155cf2.tar.xz
wireguard-openbsd-a4bfea9e1705b19d1b0dd556483cbf0258155cf2.zip
get_rtr_link and get_net_link are not supposed to fail and returning
NULL would be bad. So instead use a fatalx() in that impossible case. After a discussion with deraadt@ because of a parfait warning.
-rw-r--r--usr.sbin/ospfd/rde_spf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/ospfd/rde_spf.c b/usr.sbin/ospfd/rde_spf.c
index 94c74487009..e4b2d440918 100644
--- a/usr.sbin/ospfd/rde_spf.c
+++ b/usr.sbin/ospfd/rde_spf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rde_spf.c,v 1.67 2009/01/07 21:16:36 claudio Exp $ */
+/* $OpenBSD: rde_spf.c,v 1.68 2009/11/12 22:19:33 claudio Exp $ */
/*
* Copyright (c) 2005 Esben Norby <norby@openbsd.org>
@@ -1001,7 +1001,7 @@ get_rtr_link(struct vertex *v, int idx)
rtr_link->num_tos * sizeof(u_int32_t);
}
- return (NULL);
+ fatalx("get_rtr_link: index not found");
}
/* network LSA links */
@@ -1027,7 +1027,7 @@ get_net_link(struct vertex *v, int idx)
off += sizeof(struct lsa_net_link);
}
- return (NULL);
+ fatalx("get_net_link: index not found");
}
/* misc */