]> git.proxmox.com Git - mirror_qemu.git/commitdiff
qemu-char: fix warning 'res' may be used uninitialized
authorIgor Mammedov <imammedo@redhat.com>
Wed, 25 Jun 2014 08:00:41 +0000 (10:00 +0200)
committerPeter Maydell <peter.maydell@linaro.org>
Thu, 26 Jun 2014 11:34:41 +0000 (12:34 +0100)
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>
qemu-char.c

index 2e50a1093ec180bea1958886ed479d455fd7d76a..f6bdf2fae4b734038c4c767f94da0d07a6b1d4ef 100644 (file)
@@ -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) {