chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
build-sys: fix built with --disable-logind
[elogind.git]
/
src
/
shared
/
strv.h
diff --git
a/src/shared/strv.h
b/src/shared/strv.h
index afb31f385fffbb4ef68e956de953da43ec136010..635e92b728ed551142fbf0ba45a2cec502b3bd26 100644
(file)
--- a/
src/shared/strv.h
+++ b/
src/shared/strv.h
@@
-47,6
+47,10
@@
char **strv_uniq(char **l);
char **strv_new(const char *x, ...) _sentinel_ _malloc_;
char **strv_new_ap(const char *x, va_list ap) _malloc_;
char **strv_new(const char *x, ...) _sentinel_ _malloc_;
char **strv_new_ap(const char *x, va_list ap) _malloc_;
+static inline const char* STRV_IFNOTNULL(const char *x) {
+ return x ? x : (const char *) -1;
+}
+
static inline bool strv_isempty(char **l) {
return !l || !*l;
}
static inline bool strv_isempty(char **l) {
return !l || !*l;
}