From c5e87fdb7a60c1c4ef158a876e730b25be7a0894 Mon Sep 17 00:00:00 2001 From: Jay Satiro Date: Tue, 11 Jul 2017 01:53:23 -0400 Subject: strerror: Preserve Windows error code in some functions This is a follow-up to af02162 which removed (SET_)ERRNO macros. That commit was an earlier draft that I committed by mistake, which was then remedied by a5834e5 and e909de6, and now this commit. With this commit there is now no difference between the current code and the changes that were approved in the final draft. Thanks-to: Max Dymond, Marcel Raad, Daniel Stenberg, Gisle Vanem Ref: https://github.com/curl/curl/pull/1589 --- tests/libtest/lib591.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'tests/libtest/lib591.c') diff --git a/tests/libtest/lib591.c b/tests/libtest/lib591.c index c04d3fbae..53ede3fcd 100644 --- a/tests/libtest/lib591.c +++ b/tests/libtest/lib591.c @@ -44,15 +44,13 @@ int test(char *URL) int msgs_left; CURLMsg *msg; FILE *upload = NULL; - int error; start_test_timing(); upload = fopen(libtest_arg3, "rb"); if(!upload) { - error = errno; fprintf(stderr, "fopen() failed with error: %d (%s)\n", - error, strerror(error)); + errno, strerror(errno)); fprintf(stderr, "Error opening file: (%s)\n", libtest_arg3); return TEST_ERR_FOPEN; } -- cgit v1.2.3