提交 09313047 编写于 作者: I Igor Mammedov 提交者: Peter Maydell

qemu-char: fix warning 'res' may be used uninitialized

Signed-off-by: NIgor Mammedov <imammedo@redhat.com>
Message-id: 1403683241-20678-1-git-send-email-imammedo@redhat.com
Reviewed-by: NMarkus Armbruster <armbru@redhat.com>
Reviewed-by: NStefan Weil <sw@weilnetz.de>
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
上级 2b5b7ae9
...@@ -132,7 +132,7 @@ int qemu_chr_fe_write(CharDriverState *s, const uint8_t *buf, int len) ...@@ -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 qemu_chr_fe_write_all(CharDriverState *s, const uint8_t *buf, int len)
{ {
int offset = 0; int offset = 0;
int res; int res = 0;
qemu_mutex_lock(&s->chr_write_lock); qemu_mutex_lock(&s->chr_write_lock);
while (offset < len) { while (offset < len) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册