projects
/
systemd
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
af0b60b
)
strv: allow to set separator NULL in strv_split() or strv_split_full()
author
Yu Watanabe
<watanabe.yu+github@gmail.com>
Wed, 26 Sep 2018 10:20:43 +0000
(19:20 +0900)
committer
Yu Watanabe
<watanabe.yu+github@gmail.com>
Wed, 26 Sep 2018 10:20:43 +0000
(19:20 +0900)
src/basic/strv.c
patch
|
blob
|
history
diff --git
a/src/basic/strv.c
b/src/basic/strv.c
index ffc7b98d702e8a1ed3312d782a933c0bbca48be6..0647a472d70482af8df22cb8e6a9eb0a541003a1 100644
(file)
--- a/
src/basic/strv.c
+++ b/
src/basic/strv.c
@@
-253,6
+253,9
@@
char **strv_split_full(const char *s, const char *separator, bool quoted) {
assert(s);
+ if (!separator)
+ separator = WHITESPACE;
+
s += strspn(s, separator);
if (isempty(s))
return new0(char*, 1);