Skip to content
Snippets Groups Projects
Commit dc10e8b3 authored by Stefan Hajnoczi's avatar Stefan Hajnoczi
Browse files

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: default avatarDr David Alan Gilbert <davidagilbert@uk.ibm.com>
Reviewed-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
Signed-off-by: default avatarStefan Hajnoczi <stefanha@linux.vnet.ibm.com>
parent 7a3fc891
No related branches found
No related tags found
No related merge requests found
......@@ -202,12 +202,10 @@ static void *nbd_client_thread(void *arg)
int ret;
pthread_t show_parts_thread;
do {
sock = unix_socket_outgoing(sockpath);
if (sock == -1) {
goto out;
}
} while (sock == -1);
sock = unix_socket_outgoing(sockpath);
if (sock == -1) {
goto out;
}
ret = nbd_receive_negotiate(sock, NULL, &nbdflags,
&size, &blocksize);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment