summaryrefslogtreecommitdiff
path: root/src/basic/env-util.c
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2015-06-19 15:24:34 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2015-08-07 15:50:43 +0000
commit8adaf7bd23baa6e2cd99e9e88e55d0f5f5db29a2 (patch)
tree708a0dd3995411d49cee3174f340986b9e5587c5 /src/basic/env-util.c
parentffcd3e89d55c870c94aa15ee94dab3e029a586cf (diff)
strv: convert strv_split_quotes into a generic strv_split_extract
strv_split_extract is to strv_split_quotes as extract_first_word was to unquote_first_word. Now there's extract_first_word for extracting a single argument, extract_many_words for extracting a bounded number of arguments, and strv_split_extract for extracting an arbitrary number of arguments.
Diffstat (limited to 'src/basic/env-util.c')
-rw-r--r--src/basic/env-util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/basic/env-util.c b/src/basic/env-util.c
index 9517fbc802..4804a67f91 100644
--- a/src/basic/env-util.c
+++ b/src/basic/env-util.c
@@ -550,7 +550,7 @@ char **replace_env_argv(char **argv, char **env) {
if (e) {
int r;
- r = strv_split_quoted(&m, e, EXTRACT_RELAX);
+ r = strv_split_extract(&m, e, WHITESPACE, EXTRACT_RELAX|EXTRACT_QUOTES);
if (r < 0) {
ret[k] = NULL;
strv_free(ret);