summaryrefslogtreecommitdiffhomepage
path: root/src/dhcpv6.c
diff options
context:
space:
mode:
authorRosen Penev <rosenp@gmail.com>2017-12-16 19:55:04 -0800
committerHans Dedecker <dedeckeh@gmail.com>2017-12-17 20:02:02 +0100
commit7aa2594c5a127d92fa8f04328ac7b43e595bcaa7 (patch)
tree9dbfea93d259084641f30172efc65692d0540205 /src/dhcpv6.c
parent750e457e3000187b85906814a2529ede24775325 (diff)
odhcpd: Replace strerror(errno) with %m format
Saves a few bytes. Signed-off-by: Rosen Penev <rosenp@gmail.com>
Diffstat (limited to 'src/dhcpv6.c')
-rw-r--r--src/dhcpv6.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/dhcpv6.c b/src/dhcpv6.c
index 462a85e..e092c10 100644
--- a/src/dhcpv6.c
+++ b/src/dhcpv6.c
@@ -53,8 +53,7 @@ int dhcpv6_setup_interface(struct interface *iface, bool enable)
if (enable && iface->dhcpv6) {
int sock = socket(AF_INET6, SOCK_DGRAM | SOCK_CLOEXEC, IPPROTO_UDP);
if (sock < 0) {
- syslog(LOG_ERR, "Failed to create DHCPv6 server socket: %s",
- strerror(errno));
+ syslog(LOG_ERR, "Failed to create DHCPv6 server socket: %m");
return -1;
}
@@ -76,8 +75,7 @@ int dhcpv6_setup_interface(struct interface *iface, bool enable)
0, IN6ADDR_ANY_INIT, 0};
if (bind(sock, (struct sockaddr*)&bind_addr, sizeof(bind_addr))) {
- syslog(LOG_ERR, "Failed to open DHCPv6 server socket: %s",
- strerror(errno));
+ syslog(LOG_ERR, "Failed to open DHCPv6 server socket: %m");
return -1;
}