|
Pablo Greco |
40546a |
From c93476692d7e0373f147c3ed20761ea1fe836e89 Mon Sep 17 00:00:00 2001
|
|
Pablo Greco |
40546a |
Message-Id: <c93476692d7e0373f147c3ed20761ea1fe836e89@dist-git>
|
|
Pablo Greco |
40546a |
From: =?UTF-8?q?J=C3=A1n=20Tomko?= <jtomko@redhat.com>
|
|
Pablo Greco |
40546a |
Date: Mon, 1 Jul 2019 17:08:16 +0200
|
|
Pablo Greco |
40546a |
Subject: [PATCH] internal: introduce a family of NULLSTR macros
|
|
Pablo Greco |
40546a |
MIME-Version: 1.0
|
|
Pablo Greco |
40546a |
Content-Type: text/plain; charset=UTF-8
|
|
Pablo Greco |
40546a |
Content-Transfer-Encoding: 8bit
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
NULLSTR_EMPTY, the quiet child,
|
|
Pablo Greco |
40546a |
NULLSTR_STAR, the famous one and
|
|
Pablo Greco |
40546a |
NULLSTR_MINUS, the grumpy one.
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
Signed-off-by: Ján Tomko <jtomko@redhat.com>
|
|
Pablo Greco |
40546a |
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
|
|
Pablo Greco |
40546a |
(cherry picked from commit bd5519deb75e9ff8adcd56d34cbe82dd6a341bcb)
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1689297
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
|
|
Pablo Greco |
40546a |
Message-Id: <16722b79dbd931a33ef495b863c5716bb5d6e97c.1561993100.git.phrdina@redhat.com>
|
|
Pablo Greco |
40546a |
Reviewed-by: Ján Tomko <jtomko@redhat.com>
|
|
Pablo Greco |
40546a |
---
|
|
Pablo Greco |
40546a |
src/internal.h | 15 +++++++++++++++
|
|
Pablo Greco |
40546a |
1 file changed, 15 insertions(+)
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
diff --git a/src/internal.h b/src/internal.h
|
|
Pablo Greco |
40546a |
index 47ff0479d2..a4f6605a50 100644
|
|
Pablo Greco |
40546a |
--- a/src/internal.h
|
|
Pablo Greco |
40546a |
+++ b/src/internal.h
|
|
Pablo Greco |
40546a |
@@ -244,6 +244,21 @@
|
|
Pablo Greco |
40546a |
*/
|
|
Pablo Greco |
40546a |
# define EMPTYSTR(s) ((s) ? (s) : "-")
|
|
Pablo Greco |
40546a |
|
|
Pablo Greco |
40546a |
+/*
|
|
Pablo Greco |
40546a |
+ * Turn a NULL string into an empty string
|
|
Pablo Greco |
40546a |
+ */
|
|
Pablo Greco |
40546a |
+# define NULLSTR_EMPTY(s) ((s) ? (s) : "")
|
|
Pablo Greco |
40546a |
+
|
|
Pablo Greco |
40546a |
+/*
|
|
Pablo Greco |
40546a |
+ * Turn a NULL string into a star
|
|
Pablo Greco |
40546a |
+ */
|
|
Pablo Greco |
40546a |
+# define NULLSTR_STAR(s) ((s) ? (s) : "*")
|
|
Pablo Greco |
40546a |
+
|
|
Pablo Greco |
40546a |
+/*
|
|
Pablo Greco |
40546a |
+ * Turn a NULL string into a minus sign
|
|
Pablo Greco |
40546a |
+ */
|
|
Pablo Greco |
40546a |
+# define NULLSTR_MINUS(s) ((s) ? (s) : "-")
|
|
Pablo Greco |
40546a |
+
|
|
Pablo Greco |
40546a |
/**
|
|
Pablo Greco |
40546a |
* SWAP:
|
|
Pablo Greco |
40546a |
*
|
|
Pablo Greco |
40546a |
--
|
|
Pablo Greco |
40546a |
2.22.0
|
|
Pablo Greco |
40546a |
|