From: Christian Brauner Date: Sat, 7 May 2016 05:40:33 +0000 (+0200) Subject: sync.c: use correct types X-Git-Tag: lxc-1.0.9~57 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d75890ba26a9f3c58c0d8028383ab0b167db6905;p=thirdparty%2Flxc.git sync.c: use correct types Signed-off-by: Christian Brauner --- diff --git a/src/lxc/sync.c b/src/lxc/sync.c index 82f68e364..c9fbcd934 100644 --- a/src/lxc/sync.c +++ b/src/lxc/sync.c @@ -36,7 +36,7 @@ lxc_log_define(lxc_sync, lxc); static int __sync_wait(int fd, int sequence) { int sync = -1; - int ret; + ssize_t ret; ret = read(fd, &sync, sizeof(sync)); if (ret < 0) { @@ -47,8 +47,8 @@ static int __sync_wait(int fd, int sequence) if (!ret) return 0; - if (ret != sizeof(sync)) { - ERROR("unexpected sync size: %d expected %lu", ret, sizeof(sync)); + if ((size_t)ret != sizeof(sync)) { + ERROR("unexpected sync size: %zu expected %zu", (size_t)ret, sizeof(sync)); return -1; }