initrd/tests: cleanup redundant code in "test-cmdline-reader.c"

Add _parse(), _parse_cons() and _parse_con() helper macros. These
already perform assertions that are common in those cases, and thus
reduce a lot of boiler plate code.

Also, _parse_cons() is exactly about parsing connections. The next
time we add an out parameter to nmi_cmdline_reader_parse() we won't
have to adjust all the call sites where this parameter doesn't matter.
This commit is contained in:
Thomas Haller 2021-01-20 16:22:32 +01:00
parent e300138892
commit 4e997d1b36
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

File diff suppressed because it is too large Load diff