HomeFreeBSD

db_command.c: use designated initializers

Description

db_command.c: use designated initializers

Provide separate helper macros for regular commands and next-level table
commands as they are mutually exclusive. This ensures proper
initialization of each element and allows us to exclude some redundant
fields, such as specifying .more = NULL for every regular command.

Reviewed by: markj, jhb
MFC after: 3 days
Sponsored by: Juniper Networks, Inc.
Sponsored by: Klara, Inc.
Differential Revision: https://reviews.freebsd.org/D35580

(cherry picked from commit 8a0994823365740f4d92842c2d6f7f524310ba64)

Details

Provenance
mhorneAuthored on Jul 5 2022, 2:45 PM
Reviewer
markj
Differential Revision
D35580: db_command.c: use designated initializers
Parents
rGe4f615b3e0f5: db_command.c: style
Branches
Unknown
Tags
Unknown