From: Masatake YAMATO Date: Tue, 5 May 2026 19:37:30 +0000 (+0900) Subject: tests: (test_mkfds) use memset explicitly to fill bpf_attr with zero X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d144b6001f64e849a793db106faa0fb4bff00d41;p=thirdparty%2Futil-linux.git tests: (test_mkfds) use memset explicitly to fill bpf_attr with zero Signed-off-by: Masatake YAMATO --- diff --git a/tests/helpers/test_mkfds.c b/tests/helpers/test_mkfds.c index eb601e4c3..4bf99ef1d 100644 --- a/tests/helpers/test_mkfds.c +++ b/tests/helpers/test_mkfds.c @@ -2977,12 +2977,13 @@ static void *make_bpf_map(const struct factory *factory, struct fdesc fdescs[], const char *sname = ARG_STRING(name); int bfd; - union bpf_attr attr = { - .map_type = imap_type_id, - .key_size = 4, - .value_size = 4, - .max_entries = 10, - }; + union bpf_attr attr; + + memset(&attr, 0, sizeof(attr)); + attr.map_type = imap_type_id; + attr.value_size = 4; + attr.key_size = 4; + attr.max_entries = 10; strncpy(attr.map_name, sname, sizeof(attr.map_name) - 1);