summaryrefslogtreecommitdiffstats
path: root/src/basic/strv.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-09-08 23:03:38 +0200
committerLennart Poettering <lennart@poettering.net>2015-09-09 08:20:20 +0200
commitece174c5439021e32ebcc858842de9586072c006 (patch)
treeb469235d6c4b195a6b53c7c5d97c0e516bfb4bc6 /src/basic/strv.c
parenttree-wide: make use of log_error_errno() return value (diff)
downloadsystemd-ece174c5439021e32ebcc858842de9586072c006.tar.xz
systemd-ece174c5439021e32ebcc858842de9586072c006.zip
tree-wide: drop {} from one-line if blocks
Patch via coccinelle.
Diffstat (limited to 'src/basic/strv.c')
-rw-r--r--src/basic/strv.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/basic/strv.c b/src/basic/strv.c
index aa68d290f6..b9aef64b15 100644
--- a/src/basic/strv.c
+++ b/src/basic/strv.c
@@ -270,9 +270,8 @@ char **strv_split_newlines(const char *s) {
if (n <= 0)
return l;
- if (isempty(l[n-1])) {
+ if (isempty(l[n - 1]))
l[n - 1] = mfree(l[n - 1]);
- }
return l;
}
@@ -291,9 +290,8 @@ int strv_split_extract(char ***t, const char *s, const char *separators, Extract
r = extract_first_word(&s, &word, separators, flags);
if (r < 0)
return r;
- if (r == 0) {
+ if (r == 0)
break;
- }
if (!GREEDY_REALLOC(l, allocated, n + 2))
return -ENOMEM;