mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:46:17 +00:00
qga/win: Use swprintf instead of snwprintf
snwprintf is a Microsoft extension, and according to the MSVC spec, it is called _snwprintf. MinGW defines both snwprintf and _snwprintf, while MSVC defines only _snwprintf. We can also use swprintf here. The only difference between the two is the return value, and we are not using it. So change the function to support MSVC build env. Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com> Link: https://lore.kernel.org/r/20260330113906.168002-2-kkostiuk@redhat.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
committed by
Paolo Bonzini
parent
aa744e614a
commit
f2a468d39e
@@ -1590,7 +1590,7 @@ static DWORD get_interface_index(const char *guid)
|
||||
ULONG index;
|
||||
DWORD status;
|
||||
wchar_t wbuf[INTERFACE_PATH_BUF_SZ];
|
||||
snwprintf(wbuf, INTERFACE_PATH_BUF_SZ, L"\\device\\tcpip_%s", guid);
|
||||
swprintf(wbuf, INTERFACE_PATH_BUF_SZ, L"\\device\\tcpip_%s", guid);
|
||||
wbuf[INTERFACE_PATH_BUF_SZ - 1] = 0;
|
||||
status = GetAdapterIndex (wbuf, &index);
|
||||
if (status != NO_ERROR) {
|
||||
|
||||
Reference in New Issue
Block a user