From cc1ffb1c5b46e351616f3e6ce7ce85ab29eb4a9f Mon Sep 17 00:00:00 2001 From: Jeremy Sowden Date: Sun, 22 Aug 2021 17:35:50 +0100 Subject: [PATCH] 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 --- extensions/xt_condition.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 */ -- 2.47.2