From: John Ferlan Date: Fri, 12 Sep 2014 12:04:28 +0000 (-0400) Subject: virsh: Resolve Coverity DEADCODE X-Git-Tag: CVE-2014-3633~52 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0268a35db4e585f82668dfeacc2894302801178f;p=thirdparty%2Flibvirt.git virsh: Resolve Coverity DEADCODE Coverity complains that on the first pass through the for loop that 'params' cannot be true, thus the ternary setting to "&" cannot be done. Since we can only ever get to this point once, drop the ternary --- diff --git a/tools/virsh-domain.c b/tools/virsh-domain.c index f80741caf0..31aa2e48a9 100644 --- a/tools/virsh-domain.c +++ b/tools/virsh-domain.c @@ -9825,8 +9825,7 @@ cmdDomDisplay(vshControl *ctl, const vshCmd *cmd) /* TLS Port */ if (tls_port) { virBufferAsprintf(&buf, - "%stls-port=%d", - params ? "&" : "?", + "?tls-port=%d", tls_port); params = true; }