aboutsummaryrefslogtreecommitdiff
path: root/iothread.c
diff options
context:
space:
mode:
authorPhilippe Mathieu-Daudé <f4bug@amsat.org>2017-07-26 23:42:08 -0300
committerMichael Tokarev <mjt@tls.msk.ru>2017-07-31 13:06:38 +0300
commitb7b1e9dd6d56612d4656817b11e43d9fbefdc497 (patch)
treecc9ab18d6dc43054a04634c88826393c81ddbbff /iothread.c
parent2a4e2e4919d1fcb915f1b33f9396aad5dc4616f5 (diff)
downloadqemu-b7b1e9dd6d56612d4656817b11e43d9fbefdc497.zip
qemu-b7b1e9dd6d56612d4656817b11e43d9fbefdc497.tar.gz
qemu-b7b1e9dd6d56612d4656817b11e43d9fbefdc497.tar.bz2
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>
Diffstat (limited to 'iothread.c')
0 files changed, 0 insertions, 0 deletions