diff options
Diffstat (limited to 'src/dhcp/nm-dhcp-dhclient.c')
| -rw-r--r-- | src/dhcp/nm-dhcp-dhclient.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/dhcp/nm-dhcp-dhclient.c b/src/dhcp/nm-dhcp-dhclient.c index 0146c8b4..af702cb4 100644 --- a/src/dhcp/nm-dhcp-dhclient.c +++ b/src/dhcp/nm-dhcp-dhclient.c @@ -29,9 +29,7 @@ #if WITH_DHCLIENT -#include <string.h> #include <stdlib.h> -#include <errno.h> #include <unistd.h> #include <stdio.h> #include <netinet/in.h> @@ -593,17 +591,19 @@ stop (NMDhcpClient *client, gboolean release) { NMDhcpDhclient *self = NM_DHCP_DHCLIENT (client); NMDhcpDhclientPrivate *priv = NM_DHCP_DHCLIENT_GET_PRIVATE (self); + int errsv; NM_DHCP_CLIENT_CLASS (nm_dhcp_dhclient_parent_class)->stop (client, release); if (priv->conf_file) - if (remove (priv->conf_file) == -1) - _LOGD ("could not remove dhcp config file \"%s\": %d (%s)", priv->conf_file, errno, g_strerror (errno)); + if (remove (priv->conf_file) == -1) { + errsv = errno; + _LOGD ("could not remove dhcp config file \"%s\": %d (%s)", priv->conf_file, errsv, nm_strerror_native (errsv)); + } if (priv->pid_file) { if (remove (priv->pid_file) == -1) { - int errsv = errno; - - _LOGD ("could not remove dhcp pid file \"%s\": %s (%d)", priv->pid_file, g_strerror (errsv), errsv); + errsv = errno; + _LOGD ("could not remove dhcp pid file \"%s\": %s (%d)", priv->pid_file, nm_strerror_native (errsv), errsv); } nm_clear_g_free (&priv->pid_file); } |