<div dir="ltr">I have already taken off that patch from the patchwork list...<div><br></div><div>and pushed a simpler version...</div><div><a href="http://lists.freedesktop.org/archives/wayland-devel/2014-November/018030.html">http://lists.freedesktop.org/archives/wayland-devel/2014-November/018030.html</a><br></div><div><br></div><div>BR</div><div>imran</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Nov 5, 2014 at 5:08 PM, Pekka Paalanen <span dir="ltr"><<a href="mailto:ppaalanen@gmail.com" target="_blank">ppaalanen@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Wed, 15 Oct 2014 22:04:46 +0300<br>
Imran Zaman <<a href="mailto:imran.zaman@gmail.com">imran.zaman@gmail.com</a>> wrote:<br>
<br>
> The reason is that strtol is used at many places in weston/wayland..<br>
> and its not covering all the error cases everywhere (i.e. its buggy)..<br>
> so its better to<br>
> encapsulate it in a function with all the input and output checks...<br>
> it can be moved to weston if its sound such a big deal...<br>
<br>
</span>libwayland-* are not generic utility libraries. We will not export this<br>
kind of functions, even if it might seem useful on a first glance.<br>
Libwayland is not a bucket where you throw everything you can imagine<br>
to be useful also elsewhere.<br>
<br>
Internal helpers would be a different matter.<br>
<span class=""><br>
> On Wed, Oct 15, 2014 at 9:42 PM, Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>> wrote:<br>
> > I don't see how this belongs in libwayland.  Sure, we use strtol twice, but<br>
> > I don't think that warrants adding 100 lines of wrapper functions and test<br>
> > cases.<br>
> > --Jason Ekstrand<br>
> ><br>
> > On Wed, Oct 15, 2014 at 6:16 AM, Rémi Denis-Courmont <<a href="mailto:remi@remlab.net">remi@remlab.net</a>><br>
> > wrote:<br>
> >><br>
> >> Le 2014-10-15 16:14, Imran Zaman a écrit :<br>
> >>><br>
> >>> Hi<br>
> >>><br>
> >>> The patch is used to replace strtol and strtoul with wl_strtol and<br>
> >>> wl_strtoul with inputs and result checks.<br>
> >><br>
> >><br>
> >> I don't know where Wayland developers stand on this, but I would rather<br>
> >> the client library function calls not clobber errno to zero.<br>
<br>
</span>Yeah, that's probably a good rule.<br>
<br>
<br>
Thanks,<br>
pq<br>
</blockquote></div><br></div>