On Wed, Mar 2, 2016 at 4:53 PM, Markus Armbruster <arm...@redhat.com> 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

Reply via email to