Files
qemu/hw/misc
Philippe Mathieu-Daudé b7b1e9dd6d ivshmem: fix incorrect error handling in ivshmem_recv_msg()
Screwed up in commit 3a55fc0f, v2.6.0.

If qemu_chr_fe_read_all() returns -EINTR the do {} statement continues and the
n accumulator used to complete reads upto sizeof(msg) is decremented by 4 (the
value of EINTR on Linux).
To avoid that, use simpler if() statements and continue if EINTR occured.

hw/misc/ivshmem.c:650:14: warning: Loss of sign in implicit conversion
    } while (n < sizeof(msg));
             ^

Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
2017-07-31 13:06:38 +03:00
..
2016-01-29 15:07:23 +00:00
2017-06-23 13:35:01 +02:00
2016-05-19 16:42:29 +02:00
2016-06-14 15:59:14 +01:00
2016-12-27 14:59:28 +00:00
2016-01-29 15:07:22 +00:00
2017-06-02 05:54:43 +01:00
2016-05-19 16:42:29 +02:00
2017-06-27 15:09:15 +02:00
2016-06-14 15:59:14 +01:00
2016-01-29 15:07:24 +00:00
2016-01-29 15:07:24 +00:00
2016-01-29 15:07:24 +00:00
2016-01-29 15:07:24 +00:00
2016-01-29 15:07:24 +00:00
2016-06-16 18:39:03 +02:00
2016-01-29 15:07:22 +00:00
2016-01-29 15:07:22 +00:00
2017-06-02 05:54:43 +01:00
2016-05-19 16:42:29 +02:00