commit | d9779e3ff14a0139fcd7f9ad212d71ee967e9305 | [log] [tgz] |
---|---|---|
author | Bryce Harrington <bryce@osg.samsung.com> | Wed Aug 03 17:40:50 2016 -0700 |
committer | Bryce Harrington <bryce@osg.samsung.com> | Sat Aug 06 18:19:16 2016 -0700 |
tree | eb6a4ffc8cb3d4edf841ff472556c1b8e82c0e63 | |
parent | 139fcabe7cdb1f2296bf02ef917aaab84e00cd4e [diff] |
option-parser: Improve error checking for strtol call Make the error checking consistent with other strtol() calls. Note that since strtol(nptr, &endptr) sets endptr == nptr if there were no digits, this catches the case where the string was blank, so there's no need to test *value != '\0'. Signed-off-by: Bryce Harrington <bryce@osg.samsung.com> Reviewed-by: Eric Engestrom <eric.engestrom@imgtec.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>