mirror of https://github.com/xemu-project/xemu.git
qemu-nbd: drop loop which can never loop
For some reason nbd_client_thread() has a do..while loop which can never loop, the condition is bogus because we would take a goto instead. Drop the loop. Reported-by: Dr David Alan Gilbert <davidagilbert@uk.ibm.com> Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Stefan Hajnoczi <stefanha@linux.vnet.ibm.com>
This commit is contained in:
parent
7a3fc891ae
commit
dc10e8b3c5
|
@ -202,12 +202,10 @@ static void *nbd_client_thread(void *arg)
|
||||||
int ret;
|
int ret;
|
||||||
pthread_t show_parts_thread;
|
pthread_t show_parts_thread;
|
||||||
|
|
||||||
do {
|
|
||||||
sock = unix_socket_outgoing(sockpath);
|
sock = unix_socket_outgoing(sockpath);
|
||||||
if (sock == -1) {
|
if (sock == -1) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
} while (sock == -1);
|
|
||||||
|
|
||||||
ret = nbd_receive_negotiate(sock, NULL, &nbdflags,
|
ret = nbd_receive_negotiate(sock, NULL, &nbdflags,
|
||||||
&size, &blocksize);
|
&size, &blocksize);
|
||||||
|
|
Loading…
Reference in New Issue