support: Set errno before testing it.
authorCarlos O'Donell <carlos@redhat.com>
Wed, 29 Apr 2020 20:31:29 +0000 (16:31 -0400)
committerCarlos O'Donell <carlos@redhat.com>
Thu, 30 Apr 2020 20:28:07 +0000 (16:28 -0400)
commit183083c35972611e7786c7ee0c96d7da571631ed
tree29b7a4b0b8dc911419d302aa0a0bfdbe94cd4d3e
parentdf6c63ebbce9679e755f0ecc716a33babee5d008
support: Set errno before testing it.

In test-conainer we should set errno to 0 before calling strtol,
and check after with TEST_COMPARE.

In tst-support_capture_subprocess we should set errno to 0 before
checking it after the call to strtol.

Tested on x86_64.

Reviewed-by: DJ Delorie <dj@redhat.com>
support/test-container.c
support/tst-support_capture_subprocess.c