From 77908cfcda4ce0463a0b7120edbd571fee20c8b9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A1n=20Tomko?= Date: Tue, 12 Feb 2019 17:11:11 +0100 Subject: [PATCH] Remove EMPTYSTR macro MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This macro neither takes nor produces an empty string. Remove it in favor of NULLSTR_MINUS. Signed-off-by: Ján Tomko Reviewed-by: Andrea Bolognani --- src/internal.h | 5 ----- tools/virsh-network.c | 10 +++++----- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/internal.h b/src/internal.h index 7c11f57e33..cf03a82105 100644 --- a/src/internal.h +++ b/src/internal.h @@ -240,11 +240,6 @@ */ # define NULLSTR(s) ((s) ? (s) : "") -/* - * Similar to NULLSTR, but print '-' to make it more user friendly. - */ -# define EMPTYSTR(s) ((s) ? (s) : "-") - /* * Turn a NULL string into an empty string */ diff --git a/tools/virsh-network.c b/tools/virsh-network.c index 94adbabff7..9b86ef8071 100644 --- a/tools/virsh-network.c +++ b/tools/virsh-network.c @@ -1398,11 +1398,11 @@ cmdNetworkDHCPLeases(vshControl *ctl, const vshCmd *cmd) if (vshTableRowAppend(table, expirytime, - EMPTYSTR(lease->mac), - EMPTYSTR(typestr), - EMPTYSTR(cidr_format), - EMPTYSTR(lease->hostname), - EMPTYSTR(lease->clientid), + NULLSTR_MINUS(lease->mac), + NULLSTR_MINUS(typestr), + NULLSTR_MINUS(cidr_format), + NULLSTR_MINUS(lease->hostname), + NULLSTR_MINUS(lease->clientid), NULL) < 0) goto cleanup; }