]> git.baikalelectronics.ru Git - kernel.git/commitdiff
audit: replace zero-length array with flexible-array member
authorXiu Jianfeng <xiujianfeng@huawei.com>
Fri, 17 Dec 2021 01:01:52 +0000 (09:01 +0800)
committerPaul Moore <paul@paul-moore.com>
Mon, 20 Dec 2021 19:53:27 +0000 (14:53 -0500)
Zero-length arrays are deprecated and should be replaced with
flexible-array members.

Link: https://github.com/KSPP/linux/issues/78
Signed-off-by: Xiu Jianfeng <xiujianfeng@huawei.com>
Signed-off-by: Paul Moore <paul@paul-moore.com>
include/uapi/linux/audit.h

index 9176a095fefc98f8e77f64b666825eb3b752bef5..8eda133ca4c1428d39dfc5f41a192805886a0273 100644 (file)
@@ -514,7 +514,7 @@ struct audit_rule_data {
        __u32           values[AUDIT_MAX_FIELDS];
        __u32           fieldflags[AUDIT_MAX_FIELDS];
        __u32           buflen; /* total length of string fields */
-       char            buf[0]; /* string fields buffer */
+       char            buf[];  /* string fields buffer */
 };
 
 #endif /* _UAPI_LINUX_AUDIT_H_ */