]> git.ipfire.org Git - thirdparty/systemd.git/commit
conf-parser: several cleanups for DEFINE_CONFIG_PARSE_ENUMV() macro
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 1 Sep 2024 21:11:32 +0000 (06:11 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sun, 1 Sep 2024 21:11:50 +0000 (06:11 +0900)
commit3c8dc3a3e0023fe347c7b513a3fc560530bee273
tree6110ee904d853053db3a633c4cc689f641dbc93d
parent42efe5be1ddac120897d77b8735fca5cda2ac9e5
conf-parser: several cleanups for DEFINE_CONFIG_PARSE_ENUMV() macro

- use GREEDY_REALLOC() and FOREACH_ARRAY(),
- do not set an array with only terminating 'invalid' value.

Note, this macro is only used by parsing NamePolicy= and AlternativeNamesPolicy=
in .link files. and udevd correctly handles both an empty array and an
array with only 'invalid'. Hence, this does not change any behavior.
src/shared/conf-parser.h