From: Julio Faracco Date: Fri, 2 Jun 2017 01:56:09 +0000 (-0300) Subject: util: remove dead code inside virstoragefile X-Git-Tag: v3.5.0-rc1~189 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4fd5c2fbce8306d8d6fb2b7b0803a413d15da0b5;p=thirdparty%2Flibvirt.git util: remove dead code inside virstoragefile 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 --- diff --git a/src/util/virstoragefile.c b/src/util/virstoragefile.c index 69648ca967..e82a7fb530 100644 --- a/src/util/virstoragefile.c +++ b/src/util/virstoragefile.c @@ -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;