]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/basic/path-util.h
path-util: Finish DEFAULT_PATH_NULSTR with an extra NUL (#8745)
authorFilipe Brandenburger <filbranden@google.com>
Wed, 18 Apr 2018 05:46:03 +0000 (22:46 -0700)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Wed, 18 Apr 2018 05:46:03 +0000 (07:46 +0200)
commit2259e8fbbc088fe1c2b2e9a7b92b6f05f8b98022
tree9c7f935d37a419ab17209d8ceb6d0f9754897a53
parent0630eb1bcc6a4c2d05e57f58bea77da36697530a
path-util: Finish DEFAULT_PATH_NULSTR with an extra NUL (#8745)

The NULSTR_FOREACH iterator needs to see an empty string at the end, so
we need to insert an extra NUL explicitly.

Also update PATH0_BIN_SBIN(x) to include an extra NUL terminator, rename
it to PATH_BIN_SBIN_NULSTR(x), which is more consistent with the similar
CONF_PATHS_NULSTR(x) macro.

Fixes: 5008da1ec1cf2cf8c15b702c4052e3a49583095d
src/basic/path-util.h