]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
util: remove dead code inside virstoragefile
authorJulio Faracco <jcfaracco@gmail.com>
Fri, 2 Jun 2017 01:56:09 +0000 (22:56 -0300)
committerPeter Krempa <pkrempa@redhat.com>
Fri, 2 Jun 2017 07:39:10 +0000 (09:39 +0200)
The host address or the socket path have already been checked at the
begining of the function virStorageSourceParseNBDColonString(). So,
when the parameter is not a unix socket, there is no reason to check
the address again because if it does not exists, the logic will fail
in the first IF conditional.

Signed-off-by: Julio Faracco <jcfaracco@gmail.com>
src/util/virstoragefile.c

index 69648ca967a3dde94bbdcae22d87f35dfcf02ae7..e82a7fb530fe249de47d347405e00fd042fd94ab 100644 (file)
@@ -2635,13 +2635,6 @@ virStorageSourceParseNBDColonString(const char *nbdstr,
             goto cleanup;
 
    } else {
-        if (!backing[1]) {
-            virReportError(VIR_ERR_INTERNAL_ERROR,
-                           _("missing host name in nbd string '%s'"),
-                           nbdstr);
-            goto cleanup;
-        }
-
         if (VIR_STRDUP(src->hosts->name, backing[1]) < 0)
             goto cleanup;