diff options
author | Bryce Harrington <bryce@osg.samsung.com> | 2016-08-03 17:40:51 -0700 |
---|---|---|
committer | Bryce Harrington <bryce@osg.samsung.com> | 2016-08-06 18:19:19 -0700 |
commit | 82b9f2baec2aabe659a7470cbdd51331bcd34906 (patch) | |
tree | d197d9a00377dd1f2d7ecfdb0b684861550cbb99 /libweston | |
parent | d9779e3ff14a0139fcd7f9ad212d71ee967e9305 (diff) |
Add safe_strtoint() helper
Adds a safe strtol helper function, modeled loosely after Wayland
scanner's strtouint. This encapsulates the various quirks of strtol
behavior, and streamlines the interface to just handling base-10 numbers
with a simple true/false error indicator and a uint32_t return by
reference.
Test cases are loosely derived from an earlier patch by Imran Zaman.
Signed-off-by: Bryce Harrington <bryce@osg.samsung.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com>
Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'libweston')
0 files changed, 0 insertions, 0 deletions