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.
parent e3001388
Pipeline #258795 passed with stages
in 48 minutes and 17 seconds
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment