On Sep 28, 2014 6:54 PM, "Bill Spitzak" <[email protected]> wrote:
>
> On 09/28/2014 11:49 AM, Karsten Otto wrote:
>
>> +               msg.msg_control = NULL;
>> +               msg.msg_controllen = 0;
>>                 msg.msg_flags = 0;
>>
>> +               /* Only set msg_control when sending ancillary data */
>> +               if (clen > 0) {
>> +                       msg.msg_controllen = clen;
>> +                       msg.msg_control = cmsg;
>> +               }
>
>
> How about:
>
>   msg.msg_controllen = clen;
>   msg.msg_control = clen ? cmsg : NULL;
>   msg.msg_flags = 0;

Actually, why don't we just memset the entire structure but yes, Bill's
suggestion is decent too.

>
>
>
> _______________________________________________
> wayland-devel mailing list
> [email protected]
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
_______________________________________________
wayland-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/wayland-devel

Reply via email to