]> git.ipfire.org Git - thirdparty/xtables-addons.git/commitdiff
xt_condition: use sizeof_field macro to size variable name
authorJeremy Sowden <jeremy@azazel.net>
Sun, 22 Aug 2021 16:35:50 +0000 (17:35 +0100)
committerJan Engelhardt <jengelh@inai.de>
Sun, 22 Aug 2021 19:39:36 +0000 (21:39 +0200)
4.16 introduced a macro for getting the size of a struct member, so
let's use it.

Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
extensions/xt_condition.c

index 8227c5d13f1af759995661f6373ce63abc482e78..c2c48670c7889f52b08b681b4592e3dbb0153399 100644 (file)
@@ -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 */