From patchwork Thu Jun 23 22:41:18 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 70786 Delivered-To: patch@linaro.org Received: by 10.140.28.4 with SMTP id 4csp652576qgy; Thu, 23 Jun 2016 15:47:46 -0700 (PDT) X-Received: by 10.194.200.103 with SMTP id jr7mr664680wjc.105.1466722066400; Thu, 23 Jun 2016 15:47:46 -0700 (PDT) Return-Path: Received: from mx4-phx2.redhat.com (mx4-phx2.redhat.com. [209.132.183.25]) by mx.google.com with ESMTPS id k4si171747wmg.70.2016.06.23.15.47.45 (version=TLS1 cipher=AES128-SHA bits=128/128); Thu, 23 Jun 2016 15:47:46 -0700 (PDT) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) client-ip=209.132.183.25; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.25 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx4-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u5NMicaP021044; Thu, 23 Jun 2016 18:44:38 -0400 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id u5NMfOEe002625 for ; Thu, 23 Jun 2016 18:41:24 -0400 Received: from colepc.redhat.com (ovpn-116-65.rdu2.redhat.com [10.10.116.65]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u5NMfNbl002373; Thu, 23 Jun 2016 18:41:23 -0400 From: Cole Robinson To: libvirt-list@redhat.com Date: Thu, 23 Jun 2016 18:41:18 -0400 Message-Id: <8df6921d16e2e7aef08a84890284062dd81acb6a.1466721678.git.crobinso@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] storage: Fix coverity warning X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com After commit e808d3f227 cbdata is always available here, so the check is pointless --- src/storage/storage_driver.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) -- 2.7.4 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list diff --git a/src/storage/storage_driver.c b/src/storage/storage_driver.c index 4b5419d..d75c5aa 100644 --- a/src/storage/storage_driver.c +++ b/src/storage/storage_driver.c @@ -2442,12 +2442,10 @@ storageVolUpload(virStorageVolPtr obj, /* Add cleanup callback - call after uploadVol since the stream * is then fully set up */ - if (cbdata) { - virFDStreamSetInternalCloseCb(stream, - virStorageVolFDStreamCloseCb, - cbdata, NULL); - cbdata = NULL; - } + virFDStreamSetInternalCloseCb(stream, + virStorageVolFDStreamCloseCb, + cbdata, NULL); + cbdata = NULL; cleanup: virStoragePoolObjUnlock(pool);