aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--qemu-char.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/qemu-char.c b/qemu-char.c
index 2e50a1093e..f6bdf2fae4 100644
--- a/qemu-char.c
+++ b/qemu-char.c
@@ -132,7 +132,7 @@ int qemu_chr_fe_write(CharDriverState *s, const uint8_t *buf, int len)
int qemu_chr_fe_write_all(CharDriverState *s, const uint8_t *buf, int len)
{
int offset = 0;
- int res;
+ int res = 0;
qemu_mutex_lock(&s->chr_write_lock);
while (offset < len) {