From d38c8d1691b8450df9f12d0d6143ef190109f8c1 Mon Sep 17 00:00:00 2001 From: Christian Brauner Date: Sat, 7 May 2016 07:40:33 +0200 Subject: [PATCH] sync.c: use correct types Signed-off-by: Christian Brauner --- src/lxc/sync.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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; } -- 2.47.2