aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/vhost-user-bridge.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/vhost-user-bridge.c b/tests/vhost-user-bridge.c
index d820033a72..e0605a529e 100644
--- a/tests/vhost-user-bridge.c
+++ b/tests/vhost-user-bridge.c
@@ -283,7 +283,7 @@ vubr_backend_recv_cb(int sock, void *ctx)
return;
}
- do {
+ while (1) {
struct iovec *sg;
ssize_t ret, total = 0;
unsigned int num;
@@ -343,7 +343,9 @@ vubr_backend_recv_cb(int sock, void *ctx)
free(elem);
elem = NULL;
- } while (false); /* could loop if DONTWAIT worked? */
+
+ break; /* could loop if DONTWAIT worked? */
+ }
if (mhdr_cnt) {
mhdr.num_buffers = i;