aboutsummaryrefslogtreecommitdiff
path: root/vl.c
diff options
context:
space:
mode:
Diffstat (limited to 'vl.c')
-rw-r--r--vl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/vl.c b/vl.c
index b87044c53c..f98661f34e 100644
--- a/vl.c
+++ b/vl.c
@@ -3229,12 +3229,12 @@ static void qemu_event_read(void *opaque)
{
int fd = (unsigned long)opaque;
ssize_t len;
+ char buffer[512];
/* Drain the notify pipe */
do {
- char buffer[512];
len = read(fd, buffer, sizeof(buffer));
- } while ((len == -1 && errno == EINTR) || len > 0);
+ } while ((len == -1 && errno == EINTR) || len == sizeof(buffer));
}
static int qemu_event_init(void)