[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 21/38] ivshmem: Disentangle ivshmem_read()
From: |
Marc-André Lureau |
Subject: |
Re: [Qemu-devel] [PATCH 21/38] ivshmem: Disentangle ivshmem_read() |
Date: |
Wed, 2 Mar 2016 18:33:29 +0100 |
On Wed, Mar 2, 2016 at 4:53 PM, Markus Armbruster <address@hidden> wrote:
>>> + if (msg == -1) {
>>> + process_msg_shmem(s, fd);
>>
>> the previous code used to close fd if any, it's worth to keep that imho
>
> I'm blind. Where?
Sorry, wrong place I looked at, seems you got them all.
if (msg < -1 || msg > IVSHMEM_MAX_PEERS) {
error_report("server sent invalid message %" PRId64, msg);
close(fd);
return;
}
However, why not keep the if fd != -1 here (not a great idea to call
close otherwise)
--
Marc-André Lureau