]> xenbits.xensource.com Git - libvirt.git/commitdiff
Remove EMPTYSTR macro
authorJán Tomko <jtomko@redhat.com>
Tue, 12 Feb 2019 16:11:11 +0000 (17:11 +0100)
committerJán Tomko <jtomko@redhat.com>
Thu, 14 Feb 2019 13:09:38 +0000 (14:09 +0100)
This macro neither takes nor produces an empty string.
Remove it in favor of NULLSTR_MINUS.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
src/internal.h
tools/virsh-network.c

index 7c11f57e33865e7613c458d3effc8f1a59586c28..cf03a821054560f640257d11246efb4c292b6857 100644 (file)
  */
 # define NULLSTR(s) ((s) ? (s) : "<null>")
 
-/*
- * Similar to NULLSTR, but print '-' to make it more user friendly.
- */
-# define EMPTYSTR(s) ((s) ? (s) : "-")
-
 /*
  * Turn a NULL string into an empty string
  */
index 94adbabff711cf8b3ab134ab105cd27e7e684a92..9b86ef8071d1527cc39ac6f26a571bb026f5d6fc 100644 (file)
@@ -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;
     }