From 8c78f8fcc228a7fd2cb34fde1338723b690b4abd Mon Sep 17 00:00:00 2001 From: Gerhard Jaeger Date: Wed, 11 May 2005 14:46:12 +0000 Subject: [PATCH] Applied patch (see bug #301605). --- backend/plustek-pp_misc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/backend/plustek-pp_misc.c b/backend/plustek-pp_misc.c index c91e4fad9..0873de5e1 100644 --- a/backend/plustek-pp_misc.c +++ b/backend/plustek-pp_misc.c @@ -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(¤t_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__