1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 04:31:29 +00:00

Pass error along instead of printing (link error)

This commit is contained in:
dmiller
2020-09-02 17:05:55 +00:00
parent 8390fa0be0
commit 8e65c92264

View File

@@ -184,8 +184,7 @@ char *socket_strerror(int errnum) {
FORMAT_MESSAGE_MAX_WIDTH_MASK,
0, errnum, 0, buffer, sizeof(buffer), NULL))
{
error("FormatMessage error: %08x", GetLastError());
buffer[0] = '\0';
Snprintf(buffer, 255, "socket error %d; FormatMessage error: %08x", errnum, GetLastError());
};
return buffer;