[systemd-devel] [PATCH] util: don't consider trailing whitespaces as an empty string in split_quoted
Tom Gundersen
teg at jklm.no
Wed Nov 27 09:45:06 PST 2013
On Wed, Nov 27, 2013 at 6:00 PM, Lukas Nykryn <lnykryn at redhat.com> wrote:
> ---
> src/shared/util.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/src/shared/util.c b/src/shared/util.c
> index 3a4d196..c68ab09 100644
> --- a/src/shared/util.c
> +++ b/src/shared/util.c
> @@ -383,7 +383,9 @@ char *split_quoted(const char *c, size_t *l, char **state) {
>
> current += strspn(current, WHITESPACE);
>
> - if (*current == '\'') {
> + if (*current == 0)
> + return NULL;
> + else if (*current == '\'') {
> current ++;
>
> for (e = current; *e; e++) {
> --
> 1.8.3.1
Dave,
Is this the proper fix to the /proc/cmdline bug you told me about some
time ago? What happened to that in the end?
-t
More information about the systemd-devel
mailing list