diff options
author | Daniel Lezcano <daniel.lezcano@free.fr> | 2010-10-12 15:11:45 +0200 |
---|---|---|
committer | Daniel Lezcano <dlezcano@fr.ibm.com> | 2010-10-12 15:11:45 +0200 |
commit | 6ca5b95ef731182ad2c409f042e44d3309bb8b69 (patch) | |
tree | 36b4bf421b7a10062c2712281c1a834d6f4cb925 | |
parent | reduce function name (diff) | |
download | lxc-6ca5b95ef731182ad2c409f042e44d3309bb8b69.tar.gz lxc-6ca5b95ef731182ad2c409f042e44d3309bb8b69.tar.bz2 lxc-6ca5b95ef731182ad2c409f042e44d3309bb8b69.zip |
Fix compilation warning
Fix some compilation warnings:
* include caps.h in lxc_checkpoint and lxc_restart
* check the return of the timer notification read
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
-rw-r--r-- | src/lxc/lxc_checkpoint.c | 1 | ||||
-rw-r--r-- | src/lxc/lxc_restart.c | 1 | ||||
-rw-r--r-- | src/lxc/utmp.c | 5 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/lxc/lxc_checkpoint.c b/src/lxc/lxc_checkpoint.c index 8567f89..76f6709 100644 --- a/src/lxc/lxc_checkpoint.c +++ b/src/lxc/lxc_checkpoint.c @@ -36,6 +36,7 @@ #include "arguments.h" #include "config.h" +#include "caps.h" lxc_log_define(lxc_checkpoint_ui, lxc_checkpoint); diff --git a/src/lxc/lxc_restart.c b/src/lxc/lxc_restart.c index 3467057..7548682 100644 --- a/src/lxc/lxc_restart.c +++ b/src/lxc/lxc_restart.c @@ -31,6 +31,7 @@ #include "log.h" #include "lxc.h" +#include "caps.h" #include "conf.h" #include "config.h" #include "confile.h" diff --git a/src/lxc/utmp.c b/src/lxc/utmp.c index e6249ce..691c3ef 100644 --- a/src/lxc/utmp.c +++ b/src/lxc/utmp.c @@ -294,13 +294,16 @@ static int utmp_shutdown_handler(int fd, void *data, struct lxc_epoll_descr *descr) { int ntasks; + ssize_t nread; struct lxc_utmp *utmp_data = (struct lxc_utmp *)data; struct lxc_handler *handler = utmp_data->handler; struct lxc_conf *conf = handler->conf; uint64_t expirations; /* read and clear notifications */ - read(fd, &expirations, sizeof(expirations)); + nread = read(fd, &expirations, sizeof(expirations)); + if (nread < 0) + SYSERROR("Failed to read timer notification"); ntasks = utmp_get_ntasks(handler); |