Skip to content

Commit

Permalink
Merge pull request #1008 from brauner/bugfix_branch
Browse files Browse the repository at this point in the history
sync.c: use correct types
  • Loading branch information
hallyn committed May 9, 2016
2 parents 211a779 + d38c8d1 commit 972765f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/lxc/sync.c
Expand Up @@ -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) {
Expand All @@ -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;
}

Expand Down

0 comments on commit 972765f

Please sign in to comment.