chiark / gitweb /
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)
committerSven Eden <yamakuzure@gmx.net>
Fri, 24 Aug 2018 14:47:08 +0000 (16:47 +0200)
commit0981d331a6200bcd61f927647541bbc468631707
treec6d0187f8b5b832a123f0ac953f61f503695535e
parent6d5482545dd567d53e77c1d84b73a15fae7948ea
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