util: Replace state with separate booleans in extract_first_word
authorFilipe Brandenburger <filbranden@google.com>
Fri, 23 Oct 2015 06:12:31 +0000 (23:12 -0700)
committerFilipe Brandenburger <filbranden@google.com>
Fri, 23 Oct 2015 06:12:31 +0000 (23:12 -0700)
commit4cbf8afa0487b75525313b586853823ba5763d8e
treed078e8301c30be36b87e72460fe3b3c579b2b1cf
parentc9fc270e462bf2f4eab963bf71234d64b0c4c30f
util: Replace state with separate booleans in extract_first_word

This simplifies the logic and uniformizes the way single and double
quotes are handled. In the end, the code is about 40 lines shorter.

Tested by running the excellent test cases from test-util. Also
installed the systemd binaries including this patch and booted a
system with it, everything looked normal.
src/basic/util.c