summaryrefslogtreecommitdiffstats
path: root/src/basic/extract-word.h
diff options
context:
space:
mode:
authorMike Yuan <me@yhndnzj.com>2024-03-03 11:13:52 +0100
committerMike Yuan <me@yhndnzj.com>2024-03-03 12:01:00 +0100
commit4f49512695f8214c55c206b3c2f583dc7b309e1b (patch)
tree70c9ea001721617aa281e79d3aa6a0770bccf5e6 /src/basic/extract-word.h
parentcore/service: minor cleanup for service_add_fd_store (diff)
downloadsystemd-4f49512695f8214c55c206b3c2f583dc7b309e1b.tar.xz
systemd-4f49512695f8214c55c206b3c2f583dc7b309e1b.zip
extract-word: modernize extract_many_words
Diffstat (limited to 'src/basic/extract-word.h')
-rw-r--r--src/basic/extract-word.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/basic/extract-word.h b/src/basic/extract-word.h
index c82ad761ef..da4f6ae674 100644
--- a/src/basic/extract-word.h
+++ b/src/basic/extract-word.h
@@ -19,4 +19,7 @@ typedef enum ExtractFlags {
int extract_first_word(const char **p, char **ret, const char *separators, ExtractFlags flags);
int extract_first_word_and_warn(const char **p, char **ret, const char *separators, ExtractFlags flags, const char *unit, const char *filename, unsigned line, const char *rvalue);
-int extract_many_words(const char **p, const char *separators, unsigned flags, ...) _sentinel_;
+
+int extract_many_words_internal(const char **p, const char *separators, unsigned flags, ...) _sentinel_;
+#define extract_many_words(p, separators, flags, ...) \
+ extract_many_words_internal(p, separators, flags, ##__VA_ARGS__, NULL)