From 8adaf7bd23baa6e2cd99e9e88e55d0f5f5db29a2 Mon Sep 17 00:00:00 2001 From: Richard Maw Date: Fri, 19 Jun 2015 15:24:34 +0000 Subject: 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. --- src/locale/localed.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/locale/localed.c') diff --git a/src/locale/localed.c b/src/locale/localed.c index cb4052fdd5..e9489f04c2 100644 --- a/src/locale/localed.c +++ b/src/locale/localed.c @@ -222,7 +222,7 @@ static int x11_read_data(Context *c) { if (in_section && first_word(l, "Option")) { _cleanup_strv_free_ char **a = NULL; - r = strv_split_quoted(&a, l, 0); + r = strv_split_extract(&a, l, WHITESPACE, EXTRACT_QUOTES); if (r < 0) return r; @@ -245,7 +245,7 @@ static int x11_read_data(Context *c) { } else if (!in_section && first_word(l, "Section")) { _cleanup_strv_free_ char **a = NULL; - r = strv_split_quoted(&a, l, 0); + r = strv_split_extract(&a, l, WHITESPACE, EXTRACT_QUOTES); if (r < 0) return -ENOMEM; @@ -544,7 +544,7 @@ static int read_next_mapping(const char* filename, if (l[0] == 0 || l[0] == '#') continue; - r = strv_split_quoted(&b, l, 0); + r = strv_split_extract(&b, l, WHITESPACE, EXTRACT_QUOTES); if (r < 0) return r; -- cgit v1.2.3-54-g00ecf