From: Christian Brauner Date: Fri, 19 Feb 2021 03:33:39 +0000 (+0100) Subject: bpf: fix typos X-Git-Tag: lxc-5.0.0~275^2~7 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=159702774c56a0e7898570ff0c0673d20c972c96;p=thirdparty%2Flxc.git bpf: fix typos Signed-off-by: Christian Brauner --- diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index e264dca25..14155924f 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -3096,9 +3096,9 @@ static int bpf_device_cgroup_prepare(struct cgroup_ops *ops, return log_error_errno(-1, EINVAL, "Failed to parse device string %s=%s", key, val); /* - * Note that bpf_list_add_device() indicates whether or not it had to - * alter the current device list by return 1 and 0; both indicate - * success. A negative return value indicates and error. + * Note that bpf_list_add_device() returns 1 if it altered the device + * list and 0 if it didn't; both return values indicate success. + * Only a negative return value indicates an error. */ ret = bpf_list_add_device(&conf->bpf_devices, &device_item); if (ret < 0) diff --git a/src/lxc/cgroups/cgroup2_devices.c b/src/lxc/cgroups/cgroup2_devices.c index 98e1f73c4..f47e7e846 100644 --- a/src/lxc/cgroups/cgroup2_devices.c +++ b/src/lxc/cgroups/cgroup2_devices.c @@ -653,9 +653,9 @@ bool bpf_cgroup_devices_update(struct cgroup_ops *ops, return ret_set_errno(false, EBADF); /* - * Note that bpf_list_add_device() indicates whether or not it had to - * alter the current device list by return 1 and 0; both indicate - * success. A negative return value indicates and error. + * Note that bpf_list_add_device() returns 1 if it altered the device + * list and 0 if it didn't; both return values indicate success. + * Only a negative return value indicates an error. */ ret = bpf_list_add_device(bpf_devices, new); if (ret < 0) diff --git a/src/lxc/cgroups/cgroup2_devices.h b/src/lxc/cgroups/cgroup2_devices.h index e920992b5..d3e3788f2 100644 --- a/src/lxc/cgroups/cgroup2_devices.h +++ b/src/lxc/cgroups/cgroup2_devices.h @@ -63,9 +63,9 @@ __hidden extern void bpf_device_program_free(struct cgroup_ops *ops); __hidden extern bool bpf_devices_cgroup_supported(void); /* - * Note that bpf_list_add_device() indicates whether or not it had to alter the - * current device list by return 1 and 0; both indicate success. A negative - * return value indicates and error. + * Note that bpf_list_add_device() returns 1 if it altered the device list and + * 0 if it didn't; both return values indicate success. Only a negative return + * value indicates an error. */ __hidden extern int bpf_list_add_device(struct bpf_devices *bpf_devices, struct device_item *device);