summaryrefslogtreecommitdiffstats
path: root/src/basic/string-util.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2020-04-02 16:38:27 +0200
committerLennart Poettering <lennart@poettering.net>2020-04-02 16:43:39 +0200
commit82aa14e2a334976adf6bec6c6c08982c57d2a048 (patch)
tree9088fb85f74f3ac01b084d47d0ba1a83139f5cdf /src/basic/string-util.h
parentstring-util: make sure we eat even half complete words in split() (diff)
downloadsystemd-82aa14e2a334976adf6bec6c6c08982c57d2a048.tar.xz
systemd-82aa14e2a334976adf6bec6c6c08982c57d2a048.zip
string-util: make clear that split() + FOREACH_WORD() should die
Diffstat (limited to '')
-rw-r--r--src/basic/string-util.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/basic/string-util.h b/src/basic/string-util.h
index f98fbdddda..2a344b996f 100644
--- a/src/basic/string-util.h
+++ b/src/basic/string-util.h
@@ -112,8 +112,10 @@ typedef enum SplitFlags {
SPLIT_RELAX = 0x01 << 1,
} SplitFlags;
+/* Smelly. Do not use this anymore. Use extract_first_word() instead! */
const char* split(const char **state, size_t *l, const char *separator, SplitFlags flags);
+/* Similar, don't use this anymore */
#define FOREACH_WORD(word, length, s, state) \
_FOREACH_WORD(word, length, s, WHITESPACE, 0, state)