Tests: fix TAP_AUTOTIME parsing in tap.c
authorMichael Jeanson <mjeanson@efficios.com>
Thu, 29 Feb 2024 19:34:14 +0000 (14:34 -0500)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Thu, 29 Feb 2024 20:03:01 +0000 (15:03 -0500)
The atoi() function can return '0' on error and is not guaranteed to set
errno accordingly. Use strtol() instead which can also return 0 on error
but will set errno properly.

Check errno after the function call to distinguish between the value '0'
and the error code '0'.

Change-Id: I5a82bb0f18d7e398dc3594aede5a38e6fc10dd7b
Signed-off-by: Michael Jeanson <mjeanson@efficios.com>
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>

No differences found
This page took 0.034885 seconds and 4 git commands to generate.