[systemd-devel] [PATCH] util: don't consider trailing whitespaces as an empty string in split_quoted
Tom Gundersen
teg at jklm.no
Thu Nov 28 11:12:18 PST 2013
On Wed, Nov 27, 2013 at 7:12 PM, Dave Reisner <d at falconindy.com> wrote:
> On Wed, Nov 27, 2013 at 06:45:06PM +0100, Tom Gundersen wrote:
>> 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
>
> Oh, interesting... Yeah, this looks like it would. I suppose da66338e1
> could be reverted if this is merged.
Done.
-t
More information about the systemd-devel
mailing list