summaryrefslogtreecommitdiffhomepage
path: root/src/dhcpv4.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/dhcpv4.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/dhcpv4.c')
-rw-r--r--src/dhcpv4.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/dhcpv4.c b/src/dhcpv4.c
index c367507..db5f138 100644
--- a/src/dhcpv4.c
+++ b/src/dhcpv4.c
@@ -86,8 +86,7 @@ int dhcpv4_setup_interface(struct interface *iface, bool enable)
int sock = socket(AF_INET, SOCK_DGRAM | SOCK_CLOEXEC, IPPROTO_UDP);
if (sock < 0) {
- syslog(LOG_ERR, "Failed to create DHCPv4 server socket: %s",
- strerror(errno));
+ syslog(LOG_ERR, "Failed to create DHCPv4 server socket: %m");
return -1;
}
@@ -110,8 +109,7 @@ int dhcpv4_setup_interface(struct interface *iface, bool enable)
{INADDR_ANY}, {0}};
if (bind(sock, (struct sockaddr*)&bind_addr, sizeof(bind_addr))) {
- syslog(LOG_ERR, "Failed to open DHCPv4 server socket: %s",
- strerror(errno));
+ syslog(LOG_ERR, "Failed to open DHCPv4 server socket: %m");
return -1;
}