[PATCH 1/4] connection: Fix sendmsg() on BSD systems
Jason Ekstrand
jason at jlekstrand.net
Sun Sep 28 21:29:24 PDT 2014
On Sep 28, 2014 6:54 PM, "Bill Spitzak" <spitzak at gmail.com> 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
> wayland-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/wayland-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140928/0f1fb990/attachment.html>
More information about the wayland-devel
mailing list