From e043eaad9463ce1241b0049814d20bb2a7340990 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Sun, 11 Nov 2007 22:59:34 +0000 Subject: add new function pa_strnull() to simplify passing null strings to non-linux printf() git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2045 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/pulsecore/macro.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/pulsecore/macro.h b/src/pulsecore/macro.h index 4b62dd21..41af19c9 100644 --- a/src/pulsecore/macro.h +++ b/src/pulsecore/macro.h @@ -152,4 +152,8 @@ typedef int pa_bool_t; #define PA_PATH_SEP_CHAR '/' #endif +static inline const char *pa_strnull(const char *x) { + return x ? x : "(null)"; +} + #endif -- cgit