]> git.ipfire.org Git - thirdparty/systemd.git/commit
shared/specifier: treat NULL the same as ""
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Jan 2022 14:47:22 +0000 (15:47 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Thu, 20 Jan 2022 21:34:08 +0000 (22:34 +0100)
commit01c69460811f64e416c3e4a545ef84787bb6700b
tree0640a82c8e5040859cbae2ecc93fd759e03cbf3c
parent601dc59be28275a0b4ac499dd0e72233d73b39d4
shared/specifier: treat NULL the same as ""

We would busily allocate an empty string to concatenate all of it's
zero characters to the output. Let's make things a bit simpler by letting
the specifier functions return NULL to mean "nothing to append".
src/shared/specifier.c
src/test/test-specifier.c