<p dir="ltr"><br>
On Sep 28, 2014 6:54 PM, "Bill Spitzak" <<a href="mailto:spitzak@gmail.com">spitzak@gmail.com</a>> wrote:<br>
><br>
> On 09/28/2014 11:49 AM, Karsten Otto wrote:<br>
><br>
>> +               msg.msg_control = NULL;<br>
>> +               msg.msg_controllen = 0;<br>
>>                 msg.msg_flags = 0;<br>
>><br>
>> +               /* Only set msg_control when sending ancillary data */<br>
>> +               if (clen > 0) {<br>
>> +                       msg.msg_controllen = clen;<br>
>> +                       msg.msg_control = cmsg;<br>
>> +               }<br>
><br>
><br>
> How about:<br>
><br>
>   msg.msg_controllen = clen;<br>
>   msg.msg_control = clen ? cmsg : NULL;<br>
>   msg.msg_flags = 0;</p>
<p dir="ltr">Actually, why don't we just memset the entire structure but yes, Bill's suggestion is decent too.</p>
<p dir="ltr">><br>
><br>
><br>
> _______________________________________________<br>
> wayland-devel mailing list<br>
> <a href="mailto:wayland-devel@lists.freedesktop.org">wayland-devel@lists.freedesktop.org</a><br>
> <a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><br>
</p>