summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-07-04 00:58:03 +0000
committerRoy Marples <roy@marples.name>2009-07-04 00:58:03 +0000
commita95ad17c17dd38bbb4e7386fa7c78abbbbc30d7c (patch)
treea76a6b20e8260a5b59bf795ea5b622fc97f12e63
parent2063c6f9a1321a1df60d5b38511bf3270cad972e (diff)
downloaddhcpcd-a95ad17c17dd38bbb4e7386fa7c78abbbbc30d7c.tar.xz
Silence more GCC warnings about unused return values.
-rw-r--r--configure.c3
-rw-r--r--dhcpcd.c10
2 files changed, 10 insertions, 3 deletions
diff --git a/configure.c b/configure.c
index a74074c6..641a00f9 100644
--- a/configure.c
+++ b/configure.c
@@ -344,7 +344,8 @@ run_script(const struct interface *iface)
iov[1].iov_base = bigenv;
iov[1].iov_len = elen;
}
- writev(fd->fd, iov, 2);
+ if (writev(fd->fd, iov, 2) == -1)
+ syslog(LOG_ERR, "writev: %m");
}
}
free(bigenv);
diff --git a/dhcpcd.c b/dhcpcd.c
index 31d06344..1b4dd9ae 100644
--- a/dhcpcd.c
+++ b/dhcpcd.c
@@ -1365,7 +1365,10 @@ handle_args(struct fd_list *fd, int argc, char **argv)
iov[0].iov_len = sizeof(ssize_t);
iov[1].iov_base = UNCONST(VERSION);
iov[1].iov_len = len;
- writev(fd->fd, iov, 2);
+ if (writev(fd->fd, iov, 2) == -1) {
+ syslog(LOG_ERR, "writev: %m");
+ return -1;
+ }
return 0;
} else if (strcmp(*argv, "--getconfigfile") == 0) {
len = strlen(cffile ? cffile : CONFIG) + 1;
@@ -1373,7 +1376,10 @@ handle_args(struct fd_list *fd, int argc, char **argv)
iov[0].iov_len = sizeof(ssize_t);
iov[1].iov_base = cffile ? cffile : UNCONST(CONFIG);
iov[1].iov_len = len;
- writev(fd->fd, iov, 2);
+ if (writev(fd->fd, iov, 2) == -1) {
+ syslog(LOG_ERR, "writev: %m");
+ return -1;
+ }
return 0;
} else if (strcmp(*argv, "--getinterfaces") == 0) {
len = 0;