summaryrefslogtreecommitdiff
path: root/w32/subproc/w32err.c
diff options
context:
space:
mode:
Diffstat (limited to 'w32/subproc/w32err.c')
-rw-r--r--w32/subproc/w32err.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/w32/subproc/w32err.c b/w32/subproc/w32err.c
index 9b0866a..b4fe9c1 100644
--- a/w32/subproc/w32err.c
+++ b/w32/subproc/w32err.c
@@ -45,41 +45,41 @@ map_windows32_error_to_string (DWORD ercode) {
* the corresponding GCC qualifier is '__thread'.)
*/
static char szMessageBuffer[128];
- /* Fill message buffer with a default message in
- * case FormatMessage fails
- */
+ /* Fill message buffer with a default message in
+ * case FormatMessage fails
+ */
wsprintf (szMessageBuffer, "Error %ld\n", ercode);
- /*
- * Special code for winsock error handling.
- */
- if (ercode > WSABASEERR) {
+ /*
+ * Special code for winsock error handling.
+ */
+ if (ercode > WSABASEERR) {
#if 0
- HMODULE hModule = GetModuleHandle("wsock32");
- if (hModule != NULL) {
- FormatMessage(FORMAT_MESSAGE_FROM_HMODULE,
- hModule,
- ercode,
- LANG_NEUTRAL,
- szMessageBuffer,
- sizeof(szMessageBuffer),
- NULL);
- FreeLibrary(hModule);
- }
+ HMODULE hModule = GetModuleHandle("wsock32");
+ if (hModule != NULL) {
+ FormatMessage(FORMAT_MESSAGE_FROM_HMODULE,
+ hModule,
+ ercode,
+ LANG_NEUTRAL,
+ szMessageBuffer,
+ sizeof(szMessageBuffer),
+ NULL);
+ FreeLibrary(hModule);
+ }
#else
O (fatal, NILF, szMessageBuffer);
#endif
- } else {
- /*
- * Default system message handling
- */
- FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
- NULL,
- ercode,
- LANG_NEUTRAL,
- szMessageBuffer,
- sizeof(szMessageBuffer),
- NULL);
- }
+ } else {
+ /*
+ * Default system message handling
+ */
+ FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM,
+ NULL,
+ ercode,
+ LANG_NEUTRAL,
+ szMessageBuffer,
+ sizeof(szMessageBuffer),
+ NULL);
+ }
return szMessageBuffer;
}