return x ?: STRV_IGNORE;
}
-static inline bool strv_isempty(char * const *l) {
- return !l || !*l;
-}
-
int strv_split_full(char ***t, const char *s, const char *separators, ExtractFlags flags);
char** strv_split(const char *s, const char *separators);
assert(ret_initrd_pages);
assert(ret_initrd_size);
- if (entry->type != LOADER_LINUX || !entry->initrd) {
+ if (entry->type != LOADER_LINUX || strv_isempty(entry->initrd)) {
*ret_options = NULL;
*ret_initrd_pages = (Pages) {};
*ret_initrd_size = 0;
#pragma once
#include "macro-fundamental.h"
+#include "string-util-fundamental.h"
#define _STRV_FOREACH(s, l, i) \
for (typeof(*(l)) *s, *i = (l); (s = i) && *i; i++)
#define STRV_FOREACH(s, l) \
_STRV_FOREACH(s, l, UNIQ_T(i, UNIQ))
+
+static inline bool strv_isempty(sd_char * const *l) {
+ return !l || !*l;
+}