cocci: use strempty() at more places

This shortens the code by a few lines.
This commit is contained in:
Lennart Poettering
2018-01-10 17:11:19 +01:00
parent 4631116dd9
commit ad5d4b1703
8 changed files with 49 additions and 19 deletions
+3 -3
View File
@@ -52,15 +52,15 @@ static inline bool streq_ptr(const char *a, const char *b) {
}
static inline const char* strempty(const char *s) {
return s ? s : "";
return s ?: "";
}
static inline const char* strnull(const char *s) {
return s ? s : "(null)";
return s ?: "(null)";
}
static inline const char *strna(const char *s) {
return s ? s : "n/a";
return s ?: "n/a";
}
static inline bool isempty(const char *p) {