From: Roman Bogorodskiy Date: Mon, 21 Jul 2014 17:08:58 +0000 (+0400) Subject: storage: logical: drop useless if X-Git-Tag: v1.2.7-rc1~51 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=53939d58cbccce9d0f60252004449fefd41ca53d;p=thirdparty%2Flibvirt.git storage: logical: drop useless if virStorageBackendLogicalCreateVol contains a piece like: if (vol->target.path != NULL) { /* A target path passed to CreateVol has no meaning */ VIR_FREE(vol->target.path); } The 'if' is useless here, but 'syntax-check' doesn't catch that because of the comment, so drop the 'if'. --- diff --git a/src/storage/storage_backend_logical.c b/src/storage/storage_backend_logical.c index ed62c2f2ff..495998516a 100644 --- a/src/storage/storage_backend_logical.c +++ b/src/storage/storage_backend_logical.c @@ -742,10 +742,8 @@ virStorageBackendLogicalCreateVol(virConnectPtr conn, vol->type = VIR_STORAGE_VOL_BLOCK; - if (vol->target.path != NULL) { - /* A target path passed to CreateVol has no meaning */ - VIR_FREE(vol->target.path); - } + /* A target path passed to CreateVol has no meaning */ + VIR_FREE(vol->target.path); if (virAsprintf(&vol->target.path, "%s/%s", pool->def->target.path,