]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
cgroups: coding style fixes
authorChristian Brauner <christian.brauner@ubuntu.com>
Sat, 30 Jan 2021 00:10:49 +0000 (01:10 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sat, 30 Jan 2021 01:23:05 +0000 (02:23 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgroup2_devices.c

index 91b1ff6e37a14ab7d652a0792ee56deff65c8da3..26349bf8e10d3a022b906b24a8e57899f56a6bc8 100644 (file)
@@ -245,10 +245,10 @@ int bpf_program_append_device(struct bpf_program *prog, struct device_item *devi
        if (device_type > 0)
                jump_nr++;
 
-       if (device->major != -1)
+       if (device->major >= 0)
                jump_nr++;
 
-       if (device->minor != -1)
+       if (device->minor >= 0)
                jump_nr++;
 
        if (!bpf_device_all_access(access_mask)) {