mirror of
https://github.com/chromium/crashpad.git
synced 2025-03-09 14:06:33 +00:00
net: Remove extra spaces from WinHttp log messages
I recently (90054edf6202) removed the extra spaces from ntdll log messages. The winhttp messages have the same problem. Context: https://groups.google.com/a/chromium.org/d/topic/crashpad-dev/kD3a9Jekzx0 Change-Id: I49682ba99c3dfe1cd4c49507806cf8adf154bc9f Reviewed-on: https://chromium-review.googlesource.com/749305 Reviewed-by: Scott Graham <scottmg@chromium.org>
This commit is contained in:
parent
1669ca2bac
commit
c542a5ae03
@ -101,6 +101,12 @@ std::string WinHttpMessage(const char* extra) {
|
||||
GetLastError(),
|
||||
error_code);
|
||||
}
|
||||
|
||||
// Most system messages end in a space. Remove the space if it’s there,
|
||||
// because the StringPrintf() below includes one.
|
||||
if (len >= 1 && msgbuf[len - 1] == ' ') {
|
||||
msgbuf[len - 1] = '\0';
|
||||
}
|
||||
return base::StringPrintf("%s: %s (0x%lx)", extra, msgbuf, error_code);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user