]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
bpf: fix typos
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 19 Feb 2021 03:33:39 +0000 (04:33 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 19 Feb 2021 14:23:26 +0000 (15:23 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/cgroups/cgfsng.c
src/lxc/cgroups/cgroup2_devices.c
src/lxc/cgroups/cgroup2_devices.h

index e264dca25b0376cddfaee8429287ad783dc0b041..14155924f1658f46753c0af963f7d98a4a63def0 100644 (file)
@@ -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)
index 98e1f73c42857ff30b78c1547bb01f0f13dc48dd..f47e7e8464e5d9ff92b1eb3e48a347695d16f155 100644 (file)
@@ -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)
index e920992b5fa0b7a0d25f00d9913d9f5c28087b49..d3e3788f2dddaa80932f5d6ae934ac4e604130d8 100644 (file)
@@ -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);