From: Peter Krempa Date: Mon, 28 Feb 2022 14:02:41 +0000 (+0100) Subject: virsh: Use NULLSTR_EMPTY instead of ternary operator X-Git-Tag: v8.2.0-rc1~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8500571466d4eca676b205e02c25311582ea3a36;p=thirdparty%2Flibvirt.git virsh: Use NULLSTR_EMPTY instead of ternary operator Signed-off-by: Peter Krempa Reviewed-by: Ján Tomko --- diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index 73f05ce7f9..25097627ac 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -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; }