internal: introduce a family of NULLSTR macros

NULLSTR_EMPTY, the quiet child,
NULLSTR_STAR, the famous one and
NULLSTR_MINUS, the grumpy one.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
This commit is contained in:
Ján Tomko 2019-02-12 17:01:09 +01:00
parent 5657e22212
commit bd5519deb7

View File

@ -245,6 +245,21 @@
*/
# define EMPTYSTR(s) ((s) ? (s) : "-")
/*
* Turn a NULL string into an empty string
*/
# define NULLSTR_EMPTY(s) ((s) ? (s) : "")
/*
* Turn a NULL string into a star
*/
# define NULLSTR_STAR(s) ((s) ? (s) : "*")
/*
* Turn a NULL string into a minus sign
*/
# define NULLSTR_MINUS(s) ((s) ? (s) : "-")
/**
* SWAP:
*