summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2015-03-11 23:51:05 (GMT)
committerJason Evans <je@fb.com>2015-03-13 20:54:02 (GMT)
commitf69e2f6fdab40c7612be5fd69960b8c7d40dba44 (patch)
treefe5253946fd1bdd7f8a00a9bb5a930e6e77fbab8
parentd69964bd2d31387f79a5f0494de8fd255b693afb (diff)
downloadjemalloc-f69e2f6fdab40c7612be5fd69960b8c7d40dba44.zip
jemalloc-f69e2f6fdab40c7612be5fd69960b8c7d40dba44.tar.gz
jemalloc-f69e2f6fdab40c7612be5fd69960b8c7d40dba44.tar.bz2
Use the error code given to buferror on Windows
a14bce85 made buferror not take an error code, and make the Windows code path for buferror use GetLastError, while the alternative code paths used errno. Then 2a83ed02 made buferror take an error code again, and while it changed the non-Windows code paths to use that error code, the Windows code path was not changed accordingly.
-rw-r--r--src/util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/util.c b/src/util.c
index a964d70..a6ef5d5 100644
--- a/src/util.c
+++ b/src/util.c
@@ -81,7 +81,7 @@ buferror(int err, char *buf, size_t buflen)
{
#ifdef _WIN32
- FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, GetLastError(), 0,
+ FormatMessageA(FORMAT_MESSAGE_FROM_SYSTEM, NULL, err, 0,
(LPSTR)buf, buflen, NULL);
return (0);
#elif defined(__GLIBC__) && defined(_GNU_SOURCE)