mirror of
https://github.com/curl/curl.git
synced 2026-08-25 17:43:39 +03:00
tidy-up: use CURL_ARRAYSIZE()
Follow-up to 13b2ea68f0 #16111
Closes #16381
This commit is contained in:
parent
1b710381ca
commit
3fd1dfc829
35 changed files with 52 additions and 64 deletions
|
|
@ -791,7 +791,7 @@ get_winapi_error(int err, char *buf, size_t buflen)
|
|||
FormatMessageW -> wcstombs is used for Windows CE compatibility. */
|
||||
if(FormatMessageW((FORMAT_MESSAGE_FROM_SYSTEM |
|
||||
FORMAT_MESSAGE_IGNORE_INSERTS), NULL, (DWORD)err,
|
||||
LANG_NEUTRAL, wbuf, sizeof(wbuf)/sizeof(wchar_t), NULL)) {
|
||||
LANG_NEUTRAL, wbuf, CURL_ARRAYSIZE(wbuf), NULL)) {
|
||||
size_t written = wcstombs(buf, wbuf, buflen - 1);
|
||||
if(written != (size_t)-1)
|
||||
buf[written] = '\0';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue