[PATCH wayland] wl_strtol and wl_strtoul utility functions are added

Thiago Macieira thiago at kde.org
Wed Oct 15 13:20:25 PDT 2014

On Wednesday 15 October 2014 16:16:34 Rémi Denis-Courmont wrote:
> Le 2014-10-15 16:14, Imran Zaman a écrit :
> > Hi
> > 
> > The patch is used to replace strtol and strtoul with wl_strtol and
> > wl_strtoul with inputs and result checks.
> I don't know where Wayland developers stand on this, but I would rather
> the client library function calls not clobber errno to zero.

There's no other way to detect strto(u)l errors. It returns either 0, 
LONG_MIN, LONG_MAX or ULONG_MAX for errors, but those are also valid values.

Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
   Software Architect - Intel Open Source Technology Center
      PGP/GPG: 0x6EF45358; fingerprint:
      E067 918B B660 DBD1 105C  966C 33F5 F005 6EF4 5358

More information about the wayland-devel mailing list