]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
sync.c: use correct types
authorChristian Brauner <christian.brauner@mailbox.org>
Sat, 7 May 2016 05:40:33 +0000 (07:40 +0200)
committerStéphane Graber <stgraber@ubuntu.com>
Thu, 17 Nov 2016 23:21:46 +0000 (18:21 -0500)
Signed-off-by: Christian Brauner <christian.brauner@mailbox.org>
src/lxc/sync.c

index 82f68e36471e7b13cbdbe123691161215b05ac7a..c9fbcd934a0115c4f0f09baaf34c44aa3a9c9639 100644 (file)
@@ -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;
        }