From: Christian Brauner Date: Fri, 3 Jul 2020 11:40:12 +0000 (+0200) Subject: cgroups: use empty {} to initialize struct X-Git-Tag: lxc-5.0.0~398^2~1 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=50329f28c3d1bc9536672df124214c6c44a786f3;p=thirdparty%2Flxc.git cgroups: use empty {} to initialize struct Signed-off-by: Christian Brauner --- diff --git a/src/lxc/cgroups/cgfsng.c b/src/lxc/cgroups/cgfsng.c index 31ad219c1..45dde6726 100644 --- a/src/lxc/cgroups/cgfsng.c +++ b/src/lxc/cgroups/cgfsng.c @@ -2655,7 +2655,7 @@ __cgfsng_ops static int cgfsng_set(struct cgroup_ops *ops, *p = '\0'; if (pure_unified_layout(ops) && strcmp(controller, "devices") == 0) { - struct device_item device = {0}; + struct device_item device = {}; ret = device_cgroup_rule_parse(&device, key, value); if (ret < 0) @@ -2762,7 +2762,7 @@ static int device_cgroup_rule_parse_devpath(struct device_item *device, static int convert_devpath(const char *invalue, char *dest) { - struct device_item device = {0}; + struct device_item device = {}; int ret; ret = device_cgroup_rule_parse_devpath(&device, invalue); @@ -2882,7 +2882,7 @@ static int bpf_device_cgroup_prepare(struct cgroup_ops *ops, const char *val) { #ifdef HAVE_STRUCT_BPF_CGROUP_DEV_CTX - struct device_item device_item = {0}; + struct device_item device_item = {}; int ret; if (strcmp("devices.allow", key) == 0 && *val == '/')