[PATCH] Force 64 bit multiplication on 32 bit systems; fixes a bug where the server times out the display channel freakily fast.

Jeremy White jwhite at codeweavers.com
Thu Apr 26 10:09:50 PDT 2012


---
 server/red_worker.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/server/red_worker.c b/server/red_worker.c
index 297b168..e341c00 100644
--- a/server/red_worker.c
+++ b/server/red_worker.c
@@ -4636,7 +4636,7 @@ static inline uint64_t red_now(void)
 
     clock_gettime(CLOCK_MONOTONIC, &time);
 
-    return time.tv_sec * 1000000000 + time.tv_nsec;
+    return ((uint64_t) time.tv_sec) * 1000000000 + time.tv_nsec;
 }
 
 static int red_process_cursor(RedWorker *worker, uint32_t max_pipe_size, int *ring_is_empty)
-- 
1.7.9.5


--------------040301060005030002020905--


More information about the Spice-devel mailing list