svn commit: r343461 - head/lib/libc/tests/sys
Enji Cooper
ngie at FreeBSD.org
Sat Jan 26 03:43:13 UTC 2019
Author: ngie
Date: Sat Jan 26 03:43:12 2019
New Revision: 343461
URL: https://svnweb.freebsd.org/changeset/base/343461
Log:
Fix reporting errors with `gai_strerror(..)`
The return value (`err`) should be checked; not the `errno` value.
PR: 235200
Approved by: emaste (mentor)
Reviewed by: asomers, lwhsu
MFC after: 28 days
MFC with: r343362, r343365, r343367-r343368
Differential Revision: https://reviews.freebsd.org/D18969
Modified:
head/lib/libc/tests/sys/sendfile_test.c
Modified: head/lib/libc/tests/sys/sendfile_test.c
==============================================================================
--- head/lib/libc/tests/sys/sendfile_test.c Fri Jan 25 22:52:49 2019 (r343460)
+++ head/lib/libc/tests/sys/sendfile_test.c Sat Jan 26 03:43:12 2019 (r343461)
@@ -114,7 +114,7 @@ resolve_localhost(struct addrinfo **res, int domain, i
error = getaddrinfo("localhost", serv, &hints, res);
ATF_REQUIRE_EQ_MSG(error, 0,
- "getaddrinfo failed: %s", gai_strerror(errno));
+ "getaddrinfo failed: %s", gai_strerror(error));
free(serv);
}
More information about the svn-src-all
mailing list