]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
string_utils: move lxc_iterate_parts()
authorChristian Brauner <christian.brauner@ubuntu.com>
Fri, 19 Feb 2021 16:39:09 +0000 (17:39 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Fri, 19 Feb 2021 17:09:13 +0000 (18:09 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/macro.h
src/lxc/string_utils.h

index d802849eecbdadfd4b72d370c112ea142104df7a..e900df281115326782b271cc308984fb6a776c9e 100644 (file)
@@ -406,11 +406,6 @@ extern int __build_bug_on_failed;
        } while (0)
 #endif
 
-#define lxc_iterate_parts(__iterator, __splitme, __separators)                  \
-       for (char *__p = NULL, *__it = strtok_r(__splitme, __separators, &__p); \
-            (__iterator = __it);                                               \
-            __iterator = __it = strtok_r(NULL, __separators, &__p))
-
 #define prctl_arg(x) ((unsigned long)x)
 
 /* networking */
index 85962c76dc08febc817c6c0424b8de9480e8e162..52e3f35d5ea63863a74be860fc8cf5bd39f19bda 100644 (file)
@@ -187,4 +187,9 @@ static inline const char *fdstr(int fd)
        return buf;
 }
 
+#define lxc_iterate_parts(__iterator, __splitme, __separators)                  \
+       for (char *__p = NULL, *__it = strtok_r(__splitme, __separators, &__p); \
+            (__iterator = __it);                                               \
+            __iterator = __it = strtok_r(NULL, __separators, &__p))
+
 #endif /* __LXC_STRING_UTILS_H */