* cord/tests/de_win.c (WinMain): Do not call sprintf() on RegisterClass
and CreateWindow failure; invoke de_error() with the immediate error
message strings (without the error code).
wndclass.lpszClassName = szAppName;
if (RegisterClass (&wndclass) == 0) {
- char buf[50];
-
- sprintf(buf, "RegisterClass: error code: 0x%X",
- (unsigned)GetLastError());
- de_error(buf);
+ de_error("RegisterClass error");
return(0);
}
}
NULL, /* Window class menu */
hInstance, NULL);
if (hwnd == NULL) {
- char buf[50];
-
- sprintf(buf, "CreateWindow: error code: 0x%X",
- (unsigned)GetLastError());
- de_error(buf);
+ de_error("CreateWindow error");
return(0);
}