summaryrefslogtreecommitdiffstats
path: root/src/subprocess-win32.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/subprocess-win32.cc')
-rw-r--r--src/subprocess-win32.cc16
1 files changed, 1 insertions, 15 deletions
diff --git a/src/subprocess-win32.cc b/src/subprocess-win32.cc
index 79c4eba..cf61feb 100644
--- a/src/subprocess-win32.cc
+++ b/src/subprocess-win32.cc
@@ -23,21 +23,7 @@
namespace {
void Win32Fatal(const char* function) {
- DWORD err = GetLastError();
-
- char* msg_buf;
- FormatMessageA(
- FORMAT_MESSAGE_ALLOCATE_BUFFER |
- FORMAT_MESSAGE_FROM_SYSTEM |
- FORMAT_MESSAGE_IGNORE_INSERTS,
- NULL,
- err,
- MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
- (char*)&msg_buf,
- 0,
- NULL);
- Fatal("%s: %s", function, msg_buf);
- LocalFree(msg_buf);
+ Fatal("%s: %s", function, GetLastErrorString().c_str());
}
} // anonymous namespace