From: Jeremy Sowden Date: Sun, 22 Aug 2021 16:35:50 +0000 (+0100) Subject: xt_condition: use sizeof_field macro to size variable name X-Git-Tag: v3.19~15 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cc1ffb1c5b46e351616f3e6ce7ce85ab29eb4a9f;p=thirdparty%2Fxtables-addons.git xt_condition: use sizeof_field macro to size variable name 4.16 introduced a macro for getting the size of a struct member, so let's use it. Signed-off-by: Jeremy Sowden --- diff --git a/extensions/xt_condition.c b/extensions/xt_condition.c index 8227c5d..c2c4867 100644 --- a/extensions/xt_condition.c +++ b/extensions/xt_condition.c @@ -55,7 +55,7 @@ struct condition_variable { struct proc_dir_entry *status_proc; unsigned int refcount; bool enabled; - char name[sizeof(((struct xt_condition_mtinfo *)NULL)->name)]; + char name[sizeof_field(struct xt_condition_mtinfo, name)]; }; /* proc_lock is a user context only semaphore used for write access */