Author: tfaber
Date: Mon Sep 1 11:58:42 2014
New Revision: 64020
URL:
http://svn.reactos.org/svn/reactos?rev=64020&view=rev
Log:
[KERNEL32]
- Use signed multiplication for signed numbers
CORE-8502 #resolve
Modified:
trunk/reactos/dll/win32/kernel32/client/file/mailslot.c
trunk/reactos/dll/win32/kernel32/client/file/npipe.c
trunk/reactos/dll/win32/kernel32/client/utils.c
trunk/reactos/dll/win32/kernel32/client/vista.c
Modified: trunk/reactos/dll/win32/kernel32/client/file/mailslot.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/file/mailslot.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/file/mailslot.c [iso-8859-1] Mon Sep 1
11:58:42 2014
@@ -78,7 +78,7 @@
else
{
/* Convert to NT format */
- DefaultTimeOut.QuadPart = UInt32x32To64(-10000, lReadTimeout);
+ DefaultTimeOut.QuadPart = lReadTimeout * -10000LL;
}
Status = NtCreateMailslotFile(&MailslotHandle,
@@ -185,7 +185,7 @@
else
{
/* Convert to NT format */
- Timeout.QuadPart = UInt32x32To64(-10000, lReadTimeout);
+ Timeout.QuadPart = lReadTimeout * -10000LL;
}
Buffer.ReadTimeout = &Timeout;
Modified: trunk/reactos/dll/win32/kernel32/client/file/npipe.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/file/npipe.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/file/npipe.c [iso-8859-1] Mon Sep 1 11:58:42
2014
@@ -287,7 +287,7 @@
if (nDefaultTimeOut)
{
/* Convert the time to NT format */
- DefaultTimeOut.QuadPart = UInt32x32To64(nDefaultTimeOut, -10000);
+ DefaultTimeOut.QuadPart = nDefaultTimeOut * -10000LL;
}
else
{
@@ -517,7 +517,7 @@
else
{
/* Convert to NT format */
- WaitPipeInfo->Timeout.QuadPart = UInt32x32To64(-10000, nTimeOut);
+ WaitPipeInfo->Timeout.QuadPart = nTimeOut * -10000LL;
}
/* In both cases, we do have a timeout */
@@ -699,8 +699,7 @@
if (lpCollectDataTimeout)
{
/* Convert it to Quad */
- RemoteSettings.CollectDataTime.QuadPart =
- -(LONGLONG)UInt32x32To64(10000, *lpCollectDataTimeout);
+ RemoteSettings.CollectDataTime.QuadPart = *lpCollectDataTimeout * -10000LL;
}
/* Tell the driver to change them */
Modified: trunk/reactos/dll/win32/kernel32/client/utils.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/utils.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/utils.c [iso-8859-1] Mon Sep 1 11:58:42 2014
@@ -292,7 +292,7 @@
if (dwMilliseconds == INFINITE) return NULL;
/* Otherwise, convert the time to NT Format */
- Timeout->QuadPart = UInt32x32To64(dwMilliseconds, -10000);
+ Timeout->QuadPart = dwMilliseconds * -10000LL;
return Timeout;
}
Modified: trunk/reactos/dll/win32/kernel32/client/vista.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/client/…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/client/vista.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/client/vista.c [iso-8859-1] Mon Sep 1 11:58:42 2014
@@ -45,7 +45,7 @@
if (dwMilliseconds != INFINITE)
{
- TimeOut.QuadPart = UInt32x32To64(-10000, dwMilliseconds);
+ TimeOut.QuadPart = dwMilliseconds * -10000LL;
TimeOutPtr = &TimeOut;
}
@@ -80,7 +80,7 @@
if (dwMilliseconds != INFINITE)
{
- TimeOut.QuadPart = UInt32x32To64(-10000, dwMilliseconds);
+ TimeOut.QuadPart = dwMilliseconds * -10000LL;
TimeOutPtr = &TimeOut;
}