summaryrefslogtreecommitdiffstats
path: root/if-options.c
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-09-05 13:12:35 +0000
committerRoy Marples <roy@marples.name>2008-09-05 13:12:35 +0000
commitf6de5860b6c6a47c21d09ee4203895f182c01eaa (patch)
tree92744ef6e22857713422dcf2ae731911a5e451f0 /if-options.c
parent99d755f98fbd68ea54a199f5ce27516e37108cd1 (diff)
downloaddhcpcd-f6de5860b6c6a47c21d09ee4203895f182c01eaa.tar.xz
As our logger calls emulate syslog, we can use %m. However, this means we have to convert it for printf as POSIX does not require that printf supports it. This also means we drop -pedantic from our GCC flags.
Diffstat (limited to 'if-options.c')
-rw-r--r--if-options.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/if-options.c b/if-options.c
index 1b33a728..23b8ca65 100644
--- a/if-options.c
+++ b/if-options.c
@@ -275,7 +275,7 @@ parse_option(struct if_options *ifo, int opt, const char *arg)
else
s = 0;
if (s == -1) {
- logger(LOG_ERR, "hostname: %s", strerror(errno));
+ logger(LOG_ERR, "hostname: %m");
return -1;
}
if (s != 0 && ifo->hostname[1] == '.') {
@@ -291,7 +291,7 @@ parse_option(struct if_options *ifo, int opt, const char *arg)
else
s = 0;
if (s == -1) {
- logger(LOG_ERR, "vendorclassid: %s", strerror(errno));
+ logger(LOG_ERR, "vendorclassid: %m");
return -1;
}
*ifo->vendorclassid = (uint8_t)s;
@@ -372,7 +372,7 @@ parse_option(struct if_options *ifo, int opt, const char *arg)
s = parse_string((char *)ifo->userclass + ifo->userclass[0] + 2,
s, arg);
if (s == -1) {
- logger(LOG_ERR, "userclass: %s", strerror(errno));
+ logger(LOG_ERR, "userclass: %m");
return -1;
}
if (s != 0) {
@@ -407,7 +407,7 @@ parse_option(struct if_options *ifo, int opt, const char *arg)
s, arg);
}
if (s == -1) {
- logger(LOG_ERR, "vendor: %s", strerror(errno));
+ logger(LOG_ERR, "vendor: %m");
return -1;
}
if (s != 0) {
@@ -467,7 +467,7 @@ parse_option(struct if_options *ifo, int opt, const char *arg)
else
s = 0;
if (s == -1) {
- logger(LOG_ERR, "clientid: %s", strerror(errno));
+ logger(LOG_ERR, "clientid: %m");
return -1;
}
ifo->clientid[0] = (uint8_t)s;