Both of long and long long are 8 bytes on 64-bit unix, so this if does nothing and we will write 8 bytes into a 4-byte UINT.
From: Yuxuan Shui yshui@codeweavers.com
Both of long and long long are 8 bytes on 64-bit unix, so this if does nothing and we will write 8 bytes into a 4-byte UINT. --- dlls/nsiproxy.sys/ip.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/dlls/nsiproxy.sys/ip.c b/dlls/nsiproxy.sys/ip.c index 1a810f70584..1576ce1c2a1 100644 --- a/dlls/nsiproxy.sys/ip.c +++ b/dlls/nsiproxy.sys/ip.c @@ -761,10 +761,10 @@ static NTSTATUS ipv6_ipstats_get_all_parameters( const void *key, UINT key_size, for (i = 0; i < ARRAY_SIZE(ipstatlist); i++) if (!ascii_strcasecmp( buf, ipstatlist[i].name )) { - if (ipstatlist[i].size == sizeof(long)) - *(long *)ipstatlist[i].elem = strtoul( value, NULL, 10 ); + if (ipstatlist[i].size == sizeof(UINT)) + *(UINT *)ipstatlist[i].elem = strtoul( value, NULL, 10 ); else - *(long long *)ipstatlist[i].elem = strtoull( value, NULL, 10 ); + *(ULONGLONG *)ipstatlist[i].elem = strtoull( value, NULL, 10 ); status = STATUS_SUCCESS; } }
This merge request was approved by Huw Davies.