nss-systemd,strv: use a common definition of a non-NULL but empty strv

Follow-up for: 239903d44c
This commit is contained in:
Lennart Poettering
2026-03-01 08:51:14 +01:00
committed by Lennart Poettering
parent 8df624bfdd
commit d423ec258c
4 changed files with 14 additions and 7 deletions
+6
View File
@@ -221,3 +221,9 @@ int string_strv_ordered_hashmap_put(OrderedHashmap **h, const char *key, const c
int strv_rebreak_lines(char **l, size_t width, char ***ret);
char** strv_filter_prefix(char * const *l, const char *prefix);
/* whenever we need to initialize something with a constant non-NULL, but empty strv, we can use this shared
* one */
extern const char* const strv_empty[1];
#define STRV_EMPTY ((char**) strv_empty)