aboutsummaryrefslogtreecommitdiff
path: root/qemu-char.c
diff options
context:
space:
mode:
authorIgor Mammedov <imammedo@redhat.com>2014-06-25 10:00:41 +0200
committerPeter Maydell <peter.maydell@linaro.org>2014-06-26 12:34:41 +0100
commit0931304788ecac6c7871f570c7ac8407b54e30c6 (patch)
treea87e356d4ede8b633a8777c57c38f3baf628d4d4 /qemu-char.c
parent2b5b7ae917e8db48431631b1c5d909fa46c223a6 (diff)
qemu-char: fix warning 'res' may be used uninitialized
Signed-off-by: Igor Mammedov <imammedo@redhat.com> Message-id: 1403683241-20678-1-git-send-email-imammedo@redhat.com Reviewed-by: Markus Armbruster <armbru@redhat.com> Reviewed-by: Stefan Weil <sw@weilnetz.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'qemu-char.c')
-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) {