diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-11-11 12:58:41 -0500 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2016-11-11 18:58:41 +0100 |
commit | c58bd76a6af673196ad283131cbe3edcf2bf6291 (patch) | |
tree | f6e10c3e79cd25b9eca6be7b2fa024ef009a29b5 /src/shared/bus-unit-util.c | |
parent | 5f36e3d30375cf04292bbc1bf3f4d7512cf80139 (diff) |
tree-wide: make invocations of extract_first_word more uniform (#4627)
extract_first_words deals fine with the string being NULL, so drop the upfront
check for that.
Diffstat (limited to 'src/shared/bus-unit-util.c')
-rw-r--r-- | src/shared/bus-unit-util.c | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/src/shared/bus-unit-util.c b/src/shared/bus-unit-util.c index 35e2c8f18e..4f66497f3a 100644 --- a/src/shared/bus-unit-util.c +++ b/src/shared/bus-unit-util.c @@ -398,9 +398,7 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen if (r < 0) return bus_log_create_error(r); - p = eq; - - for (;;) { + for (p = eq;;) { _cleanup_free_ char *word = NULL; r = extract_first_word(&p, &word, NULL, EXTRACT_QUOTES|EXTRACT_CUNESCAPE); @@ -482,9 +480,7 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen if (r < 0) return bus_log_create_error(r); - p = eq; - - for (;;) { + for (p = eq;;) { _cleanup_free_ char *word = NULL; int offset; @@ -531,9 +527,7 @@ int bus_append_unit_property_assignment(sd_bus_message *m, const char *assignmen if (r < 0) return bus_log_create_error(r); - p = eq; - - for (;;) { + for (p = eq;;) { _cleanup_free_ char *word = NULL; r = extract_first_word(&p, &word, NULL, EXTRACT_QUOTES); |