From 251f720b05a92294f96347b5da1a3f2ca9b55d29 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 22 Jan 2009 00:17:31 +0100 Subject: add new function pa_strna --- src/pulsecore/core-util.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/pulsecore/core-util.h') diff --git a/src/pulsecore/core-util.h b/src/pulsecore/core-util.h index 167d0735..44b3af32 100644 --- a/src/pulsecore/core-util.h +++ b/src/pulsecore/core-util.h @@ -97,6 +97,10 @@ static inline const char *pa_strempty(const char *x) { return x ? x : ""; } +static inline const char *pa_strna(const char *x) { + return x ? x : "n/a"; +} + char *pa_split(const char *c, const char*delimiters, const char **state); char *pa_split_spaces(const char *c, const char **state); @@ -198,7 +202,6 @@ pa_bool_t pa_in_system_mode(void); char *pa_machine_id(void); char *pa_uname_string(void); - #ifdef HAVE_VALGRIND_MEMCHECK_H pa_bool_t pa_in_valgrind(void); #else -- cgit