summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2009-11-12 22:19:34 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2009-11-12 22:19:34 +0000
commit29198c4812d7e13be078568c3e7d1a67749347ea (patch)
treed2ceda4130a9d8637d85bcc603c16d60a2181eee
parent26df7ccb2c79eafe35036df4ec35a68030f4e23a (diff)
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 */