mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-09-08 16:54:49 +00:00
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 <jcfaracco@gmail.com>
This commit is contained in:
parent
54aee01d87
commit
4fd5c2fbce
@ -2635,13 +2635,6 @@ virStorageSourceParseNBDColonString(const char *nbdstr,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
} else {
|
} 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)
|
if (VIR_STRDUP(src->hosts->name, backing[1]) < 0)
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user