* The client requested that the controller must be in a specific
* cgroup version.
*/
- if (fd->type != 0 && fd->type != h->fs_type)
+ if (fd->type != 0 && (cgroupfs_type_magic_t)fd->type != h->fs_type)
return ret_errno(EINVAL);
if (limit)
* that a short write would cause a buffer overrun. So be on
* the safe side.
*/
- if (ret < STRLITERALLEN(".lxc-/cgroup.procs"))
+ if ((size_t)ret < STRLITERALLEN(".lxc-/cgroup.procs"))
return log_error_errno(-EINVAL, EINVAL, "Unexpected short write would cause buffer-overrun");
slash += (ret - STRLITERALLEN("/cgroup.procs"));
pidstr_len = sprintf(pidstr, INT64_FMT, (int64_t)pid);
ret = lxc_write_nointr(target_fd0, pidstr, pidstr_len);
- if (ret > 0 && ret == pidstr_len)
+ if (ret > 0 && (size_t)ret == pidstr_len)
return log_debug(0, "Moved process into target cgroup via fd %d", target_fd0);
ret = lxc_write_nointr(target_fd1, pidstr, pidstr_len);
- if (ret > 0 && ret == pidstr_len)
+ if (ret > 0 && (size_t)ret == pidstr_len)
return log_debug(0, "Moved process into target cgroup via fd %d", target_fd1);
return log_debug_errno(-1, errno, "Failed to move process into target cgroup via fd %d and %d",
static int device_cgroup_rule_parse(struct device_item *device, const char *key,
const char *val)
{
- int count, ret;
+ size_t count;
+ int ret;
char temp[50];
if (strequal("devices.allow", key))