summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpamela <pamela@cvs.openbsd.org>2019-03-11 15:27:08 +0000
committerpamela <pamela@cvs.openbsd.org>2019-03-11 15:27:08 +0000
commitbc3bd6031da6f05d2ab70031c1d17f6b49e8cb48 (patch)
tree49917e8f764860ead08c9aa402b514a1b33b70aa
parente1036ee0b193bce4057e0af17e1b36db62a000f1 (diff)
Change fatal() to fatalx() where errno is not set.
input and OK florian@
-rw-r--r--sbin/slaacd/engine.c28
-rw-r--r--sbin/slaacd/slaacd.c16
2 files changed, 22 insertions, 22 deletions
diff --git a/sbin/slaacd/engine.c b/sbin/slaacd/engine.c
index 5ba2c44bbb5..c8e42331b05 100644
--- a/sbin/slaacd/engine.c
+++ b/sbin/slaacd/engine.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: engine.c,v 1.32 2019/03/02 05:34:59 pamela Exp $ */
+/* $OpenBSD: engine.c,v 1.33 2019/03/11 15:27:07 pamela Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -436,7 +436,7 @@ engine_dispatch_frontend(int fd, short event, void *bula)
break;
case IMSG_CTL_SHOW_INTERFACE_INFO:
if (IMSG_DATA_SIZE(imsg) != sizeof(if_index))
- fatal("%s: IMSG_CTL_SHOW_INTERFACE_INFO wrong "
+ fatalx("%s: IMSG_CTL_SHOW_INTERFACE_INFO wrong "
"length: %lu", __func__,
IMSG_DATA_SIZE(imsg));
memcpy(&if_index, imsg.data, sizeof(if_index));
@@ -445,14 +445,14 @@ engine_dispatch_frontend(int fd, short event, void *bula)
#endif /* SMALL */
case IMSG_REMOVE_IF:
if (IMSG_DATA_SIZE(imsg) != sizeof(if_index))
- fatal("%s: IMSG_REMOVE_IF wrong length: %lu",
+ fatalx("%s: IMSG_REMOVE_IF wrong length: %lu",
__func__, IMSG_DATA_SIZE(imsg));
memcpy(&if_index, imsg.data, sizeof(if_index));
remove_slaacd_iface(if_index);
break;
case IMSG_RA:
if (IMSG_DATA_SIZE(imsg) != sizeof(ra))
- fatal("%s: IMSG_RA wrong length: %lu",
+ fatalx("%s: IMSG_RA wrong length: %lu",
__func__, IMSG_DATA_SIZE(imsg));
memcpy(&ra, imsg.data, sizeof(ra));
iface = get_slaacd_iface_by_id(ra.if_index);
@@ -461,7 +461,7 @@ engine_dispatch_frontend(int fd, short event, void *bula)
break;
case IMSG_CTL_SEND_SOLICITATION:
if (IMSG_DATA_SIZE(imsg) != sizeof(if_index))
- fatal("%s: IMSG_CTL_SEND_SOLICITATION wrong "
+ fatalx("%s: IMSG_CTL_SEND_SOLICITATION wrong "
"length: %lu", __func__,
IMSG_DATA_SIZE(imsg));
memcpy(&if_index, imsg.data, sizeof(if_index));
@@ -476,8 +476,8 @@ engine_dispatch_frontend(int fd, short event, void *bula)
break;
case IMSG_PROPOSAL_ACK:
if (IMSG_DATA_SIZE(imsg) != sizeof(proposal_ack))
- fatal("%s: IMSG_PROPOSAL_ACK wrong length: %lu",
- __func__, IMSG_DATA_SIZE(imsg));
+ fatalx("%s: IMSG_PROPOSAL_ACK wrong length: "
+ "%lu", __func__, IMSG_DATA_SIZE(imsg));
memcpy(&proposal_ack, imsg.data, sizeof(proposal_ack));
log_debug("%s: IMSG_PROPOSAL_ACK: %lld - %d", __func__,
proposal_ack.id, proposal_ack.pid);
@@ -513,7 +513,7 @@ engine_dispatch_frontend(int fd, short event, void *bula)
break;
case IMSG_DEL_ADDRESS:
if (IMSG_DATA_SIZE(imsg) != sizeof(del_addr))
- fatal("%s: IMSG_DEL_ADDRESS wrong length: %lu",
+ fatalx("%s: IMSG_DEL_ADDRESS wrong length: %lu",
__func__, IMSG_DATA_SIZE(imsg));
memcpy(&del_addr, imsg.data, sizeof(del_addr));
iface = get_slaacd_iface_by_id(del_addr.if_index);
@@ -535,7 +535,7 @@ engine_dispatch_frontend(int fd, short event, void *bula)
break;
case IMSG_DEL_ROUTE:
if (IMSG_DATA_SIZE(imsg) != sizeof(del_route))
- fatal("%s: IMSG_DEL_ROUTE wrong length: %lu",
+ fatalx("%s: IMSG_DEL_ROUTE wrong length: %lu",
__func__, IMSG_DATA_SIZE(imsg));
memcpy(&del_route, imsg.data, sizeof(del_route));
iface = get_slaacd_iface_by_id(del_route.if_index);
@@ -556,7 +556,7 @@ engine_dispatch_frontend(int fd, short event, void *bula)
break;
case IMSG_DUP_ADDRESS:
if (IMSG_DATA_SIZE(imsg) != sizeof(dup_addr))
- fatal("%s: IMSG_DUP_ADDRESS wrong length: %lu",
+ fatalx("%s: IMSG_DUP_ADDRESS wrong length: %lu",
__func__, IMSG_DATA_SIZE(imsg));
memcpy(&dup_addr, imsg.data, sizeof(dup_addr));
iface = get_slaacd_iface_by_id(dup_addr.if_index);
@@ -662,7 +662,7 @@ engine_dispatch_main(int fd, short event, void *bula)
break;
case IMSG_UPDATE_IF:
if (IMSG_DATA_SIZE(imsg) != sizeof(imsg_ifinfo))
- fatal("%s: IMSG_UPDATE_IF wrong length: %lu",
+ fatalx("%s: IMSG_UPDATE_IF wrong length: %lu",
__func__, IMSG_DATA_SIZE(imsg));
memcpy(&imsg_ifinfo, imsg.data, sizeof(imsg_ifinfo));
@@ -748,7 +748,7 @@ engine_dispatch_main(int fd, short event, void *bula)
#ifndef SMALL
case IMSG_UPDATE_ADDRESS:
if (IMSG_DATA_SIZE(imsg) != sizeof(imsg_addrinfo))
- fatal("%s: IMSG_UPDATE_ADDRESS wrong length: "
+ fatalx("%s: IMSG_UPDATE_ADDRESS wrong length: "
"%lu", __func__, IMSG_DATA_SIZE(imsg));
memcpy(&imsg_addrinfo, imsg.data,
@@ -806,7 +806,7 @@ engine_dispatch_main(int fd, short event, void *bula)
break;
case IMSG_UPDATE_LINK_STATE:
if (IMSG_DATA_SIZE(imsg) != sizeof(imsg_link_state))
- fatal("%s: IMSG_UPDATE_LINK_STATE wrong "
+ fatalx("%s: IMSG_UPDATE_LINK_STATE wrong "
"length: %lu", __func__,
IMSG_DATA_SIZE(imsg));
@@ -1401,7 +1401,7 @@ in6_prefixlen2mask(struct in6_addr *maskp, int len)
int bytelen, bitlen, i;
if (0 > len || len > 128)
- fatal("%s: invalid prefix length(%d)\n", __func__, len);
+ fatalx("%s: invalid prefix length(%d)\n", __func__, len);
bzero(maskp, sizeof(*maskp));
bytelen = len / 8;
diff --git a/sbin/slaacd/slaacd.c b/sbin/slaacd/slaacd.c
index c205f552f76..aa54d05dff7 100644
--- a/sbin/slaacd/slaacd.c
+++ b/sbin/slaacd/slaacd.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: slaacd.c,v 1.34 2019/03/05 15:46:37 pamela Exp $ */
+/* $OpenBSD: slaacd.c,v 1.35 2019/03/11 15:27:07 pamela Exp $ */
/*
* Copyright (c) 2017 Florian Obser <florian@openbsd.org>
@@ -418,7 +418,7 @@ main_dispatch_frontend(int fd, short event, void *bula)
break;
case IMSG_UPDATE_ADDRESS:
if (IMSG_DATA_SIZE(imsg) != sizeof(imsg_addrinfo))
- fatal("%s: IMSG_UPDATE_ADDRESS wrong length: "
+ fatalx("%s: IMSG_UPDATE_ADDRESS wrong length: "
"%lu", __func__, IMSG_DATA_SIZE(imsg));
memcpy(&imsg_addrinfo, imsg.data,
sizeof(imsg_addrinfo));
@@ -427,7 +427,7 @@ main_dispatch_frontend(int fd, short event, void *bula)
break;
case IMSG_UPDATE_LINK_STATE:
if (IMSG_DATA_SIZE(imsg) != sizeof(imsg_link_state))
- fatal("%s: IMSG_UPDATE_LINK_STATE wrong "
+ fatalx("%s: IMSG_UPDATE_LINK_STATE wrong "
"length: %lu", __func__,
IMSG_DATA_SIZE(imsg));
memcpy(&imsg_link_state, imsg.data,
@@ -438,7 +438,7 @@ main_dispatch_frontend(int fd, short event, void *bula)
#endif /* SMALL */
case IMSG_UPDATE_IF:
if (IMSG_DATA_SIZE(imsg) != sizeof(imsg_ifinfo))
- fatal("%s: IMSG_UPDATE_IF wrong length: %lu",
+ fatalx("%s: IMSG_UPDATE_IF wrong length: %lu",
__func__, IMSG_DATA_SIZE(imsg));
memcpy(&imsg_ifinfo, imsg.data, sizeof(imsg_ifinfo));
if (get_soiikey(imsg_ifinfo.soiikey) == -1)
@@ -499,7 +499,7 @@ main_dispatch_engine(int fd, short event, void *bula)
switch (imsg.hdr.type) {
case IMSG_PROPOSAL:
if (IMSG_DATA_SIZE(imsg) != sizeof(proposal))
- fatal("%s: IMSG_PROPOSAL wrong "
+ fatalx("%s: IMSG_PROPOSAL wrong "
"length: %lu", __func__,
IMSG_DATA_SIZE(imsg));
memcpy(&proposal, imsg.data, sizeof(proposal));
@@ -507,7 +507,7 @@ main_dispatch_engine(int fd, short event, void *bula)
break;
case IMSG_CONFIGURE_ADDRESS:
if (IMSG_DATA_SIZE(imsg) != sizeof(address))
- fatal("%s: IMSG_CONFIGURE_ADDRESS wrong "
+ fatalx("%s: IMSG_CONFIGURE_ADDRESS wrong "
"length: %lu", __func__,
IMSG_DATA_SIZE(imsg));
memcpy(&address, imsg.data, sizeof(address));
@@ -515,7 +515,7 @@ main_dispatch_engine(int fd, short event, void *bula)
break;
case IMSG_CONFIGURE_DFR:
if (IMSG_DATA_SIZE(imsg) != sizeof(dfr))
- fatal("%s: IMSG_CONFIGURE_DFR wrong "
+ fatalx("%s: IMSG_CONFIGURE_DFR wrong "
"length: %lu", __func__,
IMSG_DATA_SIZE(imsg));
memcpy(&dfr, imsg.data, sizeof(dfr));
@@ -523,7 +523,7 @@ main_dispatch_engine(int fd, short event, void *bula)
break;
case IMSG_WITHDRAW_DFR:
if (IMSG_DATA_SIZE(imsg) != sizeof(dfr))
- fatal("%s: IMSG_WITHDRAW_DFR wrong "
+ fatalx("%s: IMSG_WITHDRAW_DFR wrong "
"length: %lu", __func__,
IMSG_DATA_SIZE(imsg));
memcpy(&dfr, imsg.data, sizeof(dfr));