]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
virsh: Use NULLSTR_EMPTY instead of ternary operator
authorPeter Krempa <pkrempa@redhat.com>
Mon, 28 Feb 2022 14:02:41 +0000 (15:02 +0100)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 3 Mar 2022 10:06:56 +0000 (11:06 +0100)
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
tools/virsh-domain.c

index 73f05ce7f95fc0487737ce82a7c100f1b9fdfa81..25097627ac63b897a9d5f7d5b7d19e64a349d90f 100644 (file)
@@ -7601,7 +7601,7 @@ cmdIOThreadInfo(vshControl *ctl, const vshCmd *cmd)
 
         ignore_value(pinInfo = virBitmapDataFormat(info[i]->cpumap, info[i]->cpumaplen));
 
-        if (vshTableRowAppend(table, iothreadIdStr, pinInfo ? pinInfo : "", NULL) < 0)
+        if (vshTableRowAppend(table, iothreadIdStr, NULLSTR_EMPTY(pinInfo), NULL) < 0)
             goto cleanup;
     }
 
@@ -14211,7 +14211,7 @@ cmdDomFSInfo(vshControl *ctl, const vshCmd *cmd)
                                   info[i]->mountpoint,
                                   info[i]->name,
                                   info[i]->fstype,
-                                  targets ? targets : "",
+                                  NULLSTR_EMPTY(targets),
                                   NULL) < 0)
                 goto cleanup;
         }