From 03994c24da957ffd6556096cdd6f6522eb968ba8 Mon Sep 17 00:00:00 2001 From: "Alexander V. Chernikov" Date: Sat, 1 Oct 2022 21:20:50 +0000 Subject: [PATCH] netlink: fix build without INVARIANTS Reported by: cy --- sys/netlink/netlink_message_parser.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/netlink/netlink_message_parser.h b/sys/netlink/netlink_message_parser.h index 2f802b0961ad..b23b223ef80e 100644 --- a/sys/netlink/netlink_message_parser.h +++ b/sys/netlink/netlink_message_parser.h @@ -249,6 +249,7 @@ nl_parse_nested(struct nlattr *nla, const struct nlhdr_parser *parser, static inline void nl_verify_parsers(const struct nlhdr_parser **parser, int count) { +#ifdef INVARIANTS for (int i = 0; i < count; i++) { const struct nlhdr_parser *p = parser[i]; int attr_type = 0; @@ -257,6 +258,7 @@ nl_verify_parsers(const struct nlhdr_parser **parser, int count) attr_type = p->np[j].type; } } +#endif } void nl_verify_parsers(const struct nlhdr_parser **parser, int count); #define NL_VERIFY_PARSERS(_p) nl_verify_parsers((_p), NL_ARRAY_LEN(_p))