[KERNEL32]

- Use signed multiplication for signed numbers
CORE-8502 #resolve

svn path=/trunk/; revision=64020
This commit is contained in:
Thomas Faber 2014-09-01 11:58:42 +00:00
parent a08e128f01
commit 5c7187c301
4 changed files with 8 additions and 9 deletions

View file

@ -78,7 +78,7 @@ CreateMailslotW(IN LPCWSTR lpName,
else
{
/* Convert to NT format */
DefaultTimeOut.QuadPart = UInt32x32To64(-10000, lReadTimeout);
DefaultTimeOut.QuadPart = lReadTimeout * -10000LL;
}
Status = NtCreateMailslotFile(&MailslotHandle,
@ -185,7 +185,7 @@ SetMailslotInfo(IN HANDLE hMailslot,
else
{
/* Convert to NT format */
Timeout.QuadPart = UInt32x32To64(-10000, lReadTimeout);
Timeout.QuadPart = lReadTimeout * -10000LL;
}
Buffer.ReadTimeout = &Timeout;

View file

@ -287,7 +287,7 @@ CreateNamedPipeW(LPCWSTR lpName,
if (nDefaultTimeOut)
{
/* Convert the time to NT format */
DefaultTimeOut.QuadPart = UInt32x32To64(nDefaultTimeOut, -10000);
DefaultTimeOut.QuadPart = nDefaultTimeOut * -10000LL;
}
else
{
@ -517,7 +517,7 @@ WaitNamedPipeW(LPCWSTR lpNamedPipeName,
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 @@ SetNamedPipeHandleState(HANDLE hNamedPipe,
if (lpCollectDataTimeout)
{
/* Convert it to Quad */
RemoteSettings.CollectDataTime.QuadPart =
-(LONGLONG)UInt32x32To64(10000, *lpCollectDataTimeout);
RemoteSettings.CollectDataTime.QuadPart = *lpCollectDataTimeout * -10000LL;
}
/* Tell the driver to change them */

View file

@ -292,7 +292,7 @@ BaseFormatTimeOut(OUT PLARGE_INTEGER Timeout,
if (dwMilliseconds == INFINITE) return NULL;
/* Otherwise, convert the time to NT Format */
Timeout->QuadPart = UInt32x32To64(dwMilliseconds, -10000);
Timeout->QuadPart = dwMilliseconds * -10000LL;
return Timeout;
}

View file

@ -45,7 +45,7 @@ SleepConditionVariableCS(IN OUT PCONDITION_VARIABLE ConditionVariable,
if (dwMilliseconds != INFINITE)
{
TimeOut.QuadPart = UInt32x32To64(-10000, dwMilliseconds);
TimeOut.QuadPart = dwMilliseconds * -10000LL;
TimeOutPtr = &TimeOut;
}
@ -80,7 +80,7 @@ SleepConditionVariableSRW(IN OUT PCONDITION_VARIABLE ConditionVariable,
if (dwMilliseconds != INFINITE)
{
TimeOut.QuadPart = UInt32x32To64(-10000, dwMilliseconds);
TimeOut.QuadPart = dwMilliseconds * -10000LL;
TimeOutPtr = &TimeOut;
}