]> xenbits.xensource.com Git - libvirt.git/commitdiff
virsh: fix return value in storage vol name completor
authorDaniel P. Berrangé <berrange@redhat.com>
Mon, 11 Feb 2019 14:21:35 +0000 (14:21 +0000)
committerDaniel P. Berrangé <berrange@redhat.com>
Tue, 19 Feb 2019 16:06:46 +0000 (16:06 +0000)
The function must return a pointer, not a boolean. Fortunately 'false'
is equivalent to 'NULL' so this bug no had ill effect previously.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
tools/virsh-completer.c

index e62226fc132014646499a3ad1a8c335dac9b8b75..7c68e2e832e2d4b26f900bc4953da658a0d5c5ee 100644 (file)
@@ -287,7 +287,7 @@ virshStorageVolNameCompleter(vshControl *ctl,
         return NULL;
 
     if (!(pool = virshCommandOptPool(ctl, cmd, "pool", NULL)))
-        return false;
+        return NULL;
 
     if ((nvols = virStoragePoolListAllVolumes(pool, &vols, flags)) < 0)
         goto error;