Fix clock source overflow on 32-bit archs
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 21 Dec 2011 21:24:48 +0000 (16:24 -0500)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Wed, 21 Dec 2011 21:24:48 +0000 (16:24 -0500)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust/clock.h

index b5d3e77cd20b7383e1723087c3b43a54233b69d5..23294d2b8c2fdf771d043e775b83664ab3d19549 100644 (file)
@@ -39,7 +39,7 @@ static __inline__ uint64_t trace_clock_read64(void)
        struct timespec ts;
 
        clock_gettime(CLOCK_MONOTONIC, &ts);
-       return (ts.tv_sec * 1000000000) + ts.tv_nsec;
+       return ((uint64_t) ts.tv_sec * 1000000000ULL) + ts.tv_nsec;
 }
 
 static __inline__ uint32_t trace_clock_freq_scale(void)
This page took 0.024323 seconds and 4 git commands to generate.