HomeFreeBSD

netlink: Don't use a zero-length array

Description

netlink: Don't use a zero-length array

Define SNL_DECLARE_FIELD_PARSER* macros to create a parser that has
no output attributes only input fields and use this to define the
snl_donemsg_parser.

This removes the need for the zero-length nla_p_donemsg[] variable.
Zero length arrays are not valid in ISO C.

Reviewed by: jrtc27, melifaro
Differential Revision: https://reviews.freebsd.org/D43918

(cherry picked from commit 69945c49fea7ac2352c1fd7d22f70f2e3861ba81)

Details

Provenance
jhbAuthored on Feb 27 2024, 7:59 PM
Reviewer
jrtc27
Differential Revision
D43918: netlink: Don't use a zero-length array
Parents
rGd2c8cb41d1a2: ipfw: Skip to the start of the loop when following a keep-state rule
Branches
Unknown
Tags
Unknown