summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/mlxcontrol/mlxcontrol.h2
-rw-r--r--usr.sbin/rrenumd/rrenumd.c40
2 files changed, 21 insertions, 21 deletions
diff --git a/usr.sbin/mlxcontrol/mlxcontrol.h b/usr.sbin/mlxcontrol/mlxcontrol.h
index f0225b5..ab0f2ab 100644
--- a/usr.sbin/mlxcontrol/mlxcontrol.h
+++ b/usr.sbin/mlxcontrol/mlxcontrol.h
@@ -28,7 +28,7 @@
#include <sys/queue.h>
-#define debug(fmt, args...) printf("%s: " fmt "\n", __FUNCTION__ , ##args)
+#define debug(fmt, args...) printf("%s: " fmt "\n", __func__ , ##args)
struct mlxd_foreach_action
{
diff --git a/usr.sbin/rrenumd/rrenumd.c b/usr.sbin/rrenumd/rrenumd.c
index 3d08fa8..2f863d6 100644
--- a/usr.sbin/rrenumd/rrenumd.c
+++ b/usr.sbin/rrenumd/rrenumd.c
@@ -155,21 +155,21 @@ join_multi(const char *addrname)
if (inet_pton(AF_INET6, addrname, &mreq.ipv6mr_multiaddr.s6_addr)
!= 1) {
syslog(LOG_ERR, "<%s> inet_pton failed(library bug?)",
- __FUNCTION__);
+ __func__);
exit(1);
}
/* ADHOC: currently join only one */
{
if ((mreq.ipv6mr_interface = if_nametoindex(ifname)) == 0) {
syslog(LOG_ERR, "<%s> ifname %s should be invalid: %s",
- __FUNCTION__, ifname, strerror(errno));
+ __func__, ifname, strerror(errno));
exit(1);
}
if (setsockopt(s, IPPROTO_IPV6, IPV6_JOIN_GROUP,
&mreq,
sizeof(mreq)) < 0) {
syslog(LOG_ERR, "<%s> IPV6_JOIN_GROUP on %s: %s",
- __FUNCTION__, ifname, strerror(errno));
+ __func__, ifname, strerror(errno));
exit(1);
}
}
@@ -198,7 +198,7 @@ init_globals()
CMSG_SPACE(sizeof(int));
if (rcvcmsgbuf == NULL &&
(rcvcmsgbuf = (u_char *)malloc(rcvcmsglen)) == NULL) {
- syslog(LOG_ERR, "<%s>: malloc failed", __FUNCTION__);
+ syslog(LOG_ERR, "<%s>: malloc failed", __func__);
exit(1);
}
rcvmhdr.msg_control = (caddr_t)rcvcmsgbuf;
@@ -211,7 +211,7 @@ init_globals()
CMSG_SPACE(sizeof(int));
if (sndcmsgbuf == NULL &&
(sndcmsgbuf = (u_char *)malloc(sndcmsglen)) == NULL) {
- syslog(LOG_ERR, "<%s>: malloc failed", __FUNCTION__);
+ syslog(LOG_ERR, "<%s>: malloc failed", __func__);
exit(1);
}
sndmhdr.msg_control = (caddr_t)sndcmsgbuf;
@@ -227,7 +227,7 @@ config(FILE **fpp)
struct rr_pco_match *rpm;
if (parse(fpp) < 0) {
- syslog(LOG_ERR, "<%s> parse failed", __FUNCTION__);
+ syslog(LOG_ERR, "<%s> parse failed", __func__);
exit(1);
}
@@ -280,7 +280,7 @@ sock6_open(struct flags *flags
return;
if (with_v6dest &&
(s6 = socket(AF_INET6, SOCK_RAW, IPPROTO_ICMPV6)) < 0) {
- syslog(LOG_ERR, "<%s> socket(v6): %s", __FUNCTION__,
+ syslog(LOG_ERR, "<%s> socket(v6): %s", __func__,
strerror(errno));
exit(1);
}
@@ -299,7 +299,7 @@ sock6_open(struct flags *flags
if (setsockopt(s6, IPPROTO_ICMPV6, ICMP6_FILTER, &filt,
sizeof(filt)) < 0) {
syslog(LOG_ERR, "<%s> IICMP6_FILTER: %s",
- __FUNCTION__, strerror(errno));
+ __func__, strerror(errno));
exit(1);
}
@@ -308,7 +308,7 @@ sock6_open(struct flags *flags
if (setsockopt(s6, IPPROTO_IPV6, IPV6_RECVPKTINFO, &on,
sizeof(on)) < 0) {
syslog(LOG_ERR, "<%s> IPV6_RECVPKTINFO: %s",
- __FUNCTION__, strerror(errno));
+ __func__, strerror(errno));
exit(1);
}
@@ -331,7 +331,7 @@ sock6_open(struct flags *flags
if (setsockopt(s6, IPPROTO_IPV6, IPV6_AUTH_TRANS_LEVEL,
&optval, sizeof(optval)) == -1) {
syslog(LOG_ERR, "<%s> IPV6_AUTH_TRANS_LEVEL: %s",
- __FUNCTION__, strerror(errno));
+ __func__, strerror(errno));
exit(1);
}
}
@@ -340,7 +340,7 @@ sock6_open(struct flags *flags
if (setsockopt(s6, IPPROTO_IPV6, IPV6_ESP_TRANS_LEVEL,
&optval, sizeof(optval)) == -1) {
syslog(LOG_ERR, "<%s> IPV6_ESP_TRANS_LEVEL: %s",
- __FUNCTION__, strerror(errno));
+ __func__, strerror(errno));
exit(1);
}
}
@@ -366,7 +366,7 @@ sock4_open(struct flags *flags
if (with_v4dest == 0)
return;
if ((s4 = socket(AF_INET, SOCK_RAW, IPPROTO_ICMPV6)) < 0) {
- syslog(LOG_ERR, "<%s> socket(v4): %s", __FUNCTION__,
+ syslog(LOG_ERR, "<%s> socket(v4): %s", __func__,
strerror(errno));
exit(1);
}
@@ -397,7 +397,7 @@ sock4_open(struct flags *flags
if (setsockopt(s4, IPPROTO_IP, IP_AUTH_TRANS_LEVEL,
&optval, sizeof(optval)) == -1) {
syslog(LOG_ERR, "<%s> IP_AUTH_TRANS_LEVEL: %s",
- __FUNCTION__, strerror(errno));
+ __func__, strerror(errno));
exit(1);
}
}
@@ -406,7 +406,7 @@ sock4_open(struct flags *flags
if (setsockopt(s4, IPPROTO_IP, IP_ESP_TRANS_LEVEL,
&optval, sizeof(optval)) == -1) {
syslog(LOG_ERR, "<%s> IP_ESP_TRANS_LEVEL: %s",
- __FUNCTION__, strerror(errno));
+ __func__, strerror(errno));
exit(1);
}
}
@@ -459,7 +459,7 @@ rrenum_output(struct payload_list *pl, struct dst_list *dl)
i = sendmsg(dl->dl_dst->sa_family == AF_INET ? s4 : s6, &sndmhdr, 0);
if (i < 0 || i != sndmhdr.msg_iov->iov_len)
- syslog(LOG_ERR, "<%s> sendmsg: %s", __FUNCTION__,
+ syslog(LOG_ERR, "<%s> sendmsg: %s", __func__,
strerror(errno));
}
@@ -493,7 +493,7 @@ rrenum_input(int s)
/* get message */
if ((i = recvmsg(s, &rcvmhdr, 0)) < 0) {
- syslog(LOG_ERR, "<%s> recvmsg: %s", __FUNCTION__,
+ syslog(LOG_ERR, "<%s> recvmsg: %s", __func__,
strerror(errno));
return;
}
@@ -501,7 +501,7 @@ rrenum_input(int s)
i -= sizeof(struct ip);
if (i < sizeof(struct icmp6_router_renum)) {
syslog(LOG_ERR, "<%s> packet size(%d) is too short",
- __FUNCTION__, i);
+ __func__, i);
return;
}
if (s == s4) {
@@ -520,7 +520,7 @@ rrenum_input(int s)
break;
default:
syslog(LOG_ERR, "<%s> received unknown code %d",
- __FUNCTION__, rr->rr_code);
+ __func__, rr->rr_code);
break;
}
}
@@ -556,7 +556,7 @@ main(int argc, char *argv[])
if((fp = fopen(optarg, "r")) == NULL) {
syslog(LOG_ERR,
"<%s> config file %s open failed",
- __FUNCTION__, optarg);
+ __func__, optarg);
exit(1);
}
break;
@@ -640,7 +640,7 @@ main(int argc, char *argv[])
if ((i = select(maxfd + 1, &select_fd, NULL, NULL,
&timeout)) < 0){
syslog(LOG_ERR, "<%s> select: %s",
- __FUNCTION__, strerror(errno));
+ __func__, strerror(errno));
continue;
}
if (i == 0) { /* timeout */
OpenPOWER on IntegriCloud