Applied patch (see bug #301605).

merge-requests/1/head
Gerhard Jaeger 2005-05-11 14:46:12 +00:00
rodzic e9152e5879
commit 8c78f8fcc2
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -601,7 +601,7 @@ _LOC void MiscRestorePort( pScanData ps )
* @param timer - pointer to the timer to start
* @param us - timeout value in micro-seconds
*/
_LOC void MiscStartTimer( pTimerDef timer , unsigned long us)
_LOC void MiscStartTimer( TimerDef *timer , unsigned long us)
{
struct timeval start_time;
@ -611,7 +611,7 @@ _LOC void MiscStartTimer( pTimerDef timer , unsigned long us)
gettimeofday(&start_time, NULL);
#endif
*timer = start_time.tv_sec * 1000000 + start_time.tv_usec + us;
*timer = (TimerDef)start_time.tv_sec * 1000000 + (TimerDef)start_time.tv_usec + us;
}
/** Checks if a timer has been expired or not. In Kernel-mode, the scheduler
@ -620,7 +620,7 @@ _LOC void MiscStartTimer( pTimerDef timer , unsigned long us)
* @return Function returns _E_TIMEOUT when the timer has been expired,
* otherwise _OK;
*/
_LOC int MiscCheckTimer( pTimerDef timer )
_LOC int MiscCheckTimer( TimerDef *timer )
{
struct timeval current_time;
@ -630,7 +630,7 @@ _LOC int MiscCheckTimer( pTimerDef timer )
gettimeofday(&current_time, NULL);
#endif
if (current_time.tv_sec * 1000000 + current_time.tv_usec > *timer) {
if ((TimerDef)current_time.tv_sec * 1000000 + (TimerDef)current_time.tv_usec > *timer) {
return _E_TIMEOUT;
} else {
#ifdef __KERNEL__