Commit 972765f9 by Serge Hallyn

Merge pull request #1008 from brauner/bugfix_branch

sync.c: use correct types
parents 211a7794 d38c8d16
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment