diff options
author | 2002-01-02 23:00:10 +0000 | |
---|---|---|
committer | 2002-01-02 23:00:10 +0000 | |
commit | 5ae9a25e5f9c19a31079ee381cacdfa83676449e (patch) | |
tree | a957a795ec700c2eb10122070c8c5a0258aaa7d4 /lib/libc/net | |
parent | at least ; required after label or case; openbsd@davidkrause.com (diff) | |
download | wireguard-openbsd-5ae9a25e5f9c19a31079ee381cacdfa83676449e.tar.xz wireguard-openbsd-5ae9a25e5f9c19a31079ee381cacdfa83676449e.zip |
label abort() from inside library as ILLEGAL
Diffstat (limited to 'lib/libc/net')
-rw-r--r-- | lib/libc/net/base64.c | 3 | ||||
-rw-r--r-- | lib/libc/net/getaddrinfo.c | 6 | ||||
-rw-r--r-- | lib/libc/net/getifaddrs.c | 6 |
3 files changed, 8 insertions, 7 deletions
diff --git a/lib/libc/net/base64.c b/lib/libc/net/base64.c index 452fe5afcc8..33b6ffdc41e 100644 --- a/lib/libc/net/base64.c +++ b/lib/libc/net/base64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: base64.c,v 1.3 1997/11/08 20:46:55 deraadt Exp $ */ +/* $OpenBSD: base64.c,v 1.4 2002/01/02 23:00:10 deraadt Exp $ */ /* * Copyright (c) 1996 by Internet Software Consortium. @@ -56,6 +56,7 @@ #include <stdlib.h> #include <string.h> +/* XXX abort illegal in library */ #define Assert(Cond) if (!(Cond)) abort() static const char Base64[] = diff --git a/lib/libc/net/getaddrinfo.c b/lib/libc/net/getaddrinfo.c index f9ba1e55d71..5b36626ceb0 100644 --- a/lib/libc/net/getaddrinfo.c +++ b/lib/libc/net/getaddrinfo.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getaddrinfo.c,v 1.30 2001/08/20 02:23:05 itojun Exp $ */ +/* $OpenBSD: getaddrinfo.c,v 1.31 2002/01/02 23:00:10 deraadt Exp $ */ /* $KAME: getaddrinfo.c,v 1.31 2000/08/31 17:36:43 itojun Exp $ */ /* @@ -1052,7 +1052,7 @@ getanswer(answer, anslen, qname, qtype, pai) name_ok = res_hnok; break; default: - return (NULL); /* XXX should be abort(); */ + return (NULL); /* XXX should be abort() -- but that is illegal */ } /* * find first satisfactory answer @@ -1185,7 +1185,7 @@ getanswer(answer, anslen, qname, qtype, pai) cp += n; break; default: - abort(); + abort(); /* XXX abort illegal in library */ } if (!had_error) haveanswer++; diff --git a/lib/libc/net/getifaddrs.c b/lib/libc/net/getifaddrs.c index ca69af8b9e4..ee8f1cb5abf 100644 --- a/lib/libc/net/getifaddrs.c +++ b/lib/libc/net/getifaddrs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: getifaddrs.c,v 1.6 2001/08/20 02:27:10 itojun Exp $ */ +/* $OpenBSD: getifaddrs.c,v 1.7 2002/01/02 23:00:10 deraadt Exp $ */ /* * Copyright (c) 1995, 1999 @@ -152,7 +152,7 @@ getifaddrs(struct ifaddrs **pif) case RTM_NEWADDR: ifam = (struct ifa_msghdr *)rtm; if (index && ifam->ifam_index != index) - abort(); /* this cannot happen */ + abort(); /* XXX abort illegal in library */ #define RTA_MASKS (RTA_NETMASK | RTA_IFA | RTA_BRD) if (index == 0 || (ifam->ifam_addrs & RTA_MASKS) == 0) @@ -279,7 +279,7 @@ getifaddrs(struct ifaddrs **pif) case RTM_NEWADDR: ifam = (struct ifa_msghdr *)rtm; if (index && ifam->ifam_index != index) - abort(); /* this cannot happen */ + abort(); /* XXX abort illegal in library */ if (index == 0 || (ifam->ifam_addrs & RTA_MASKS) == 0) break; |