changeset 2735:692398cb7abe draft

Don't overflow integer on 32-bit machines. This was causing test_bitcoin to abort on a 32-bit system likely due to -ftrapv.
author Ricardo M. Correia <rcorreia@wizy.org>
date Thu, 07 Jun 2012 19:11:15 +0200
parents 7f3b977e543c
children c3e5b0c0ee7e
files src/util.h
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/util.h
+++ b/src/util.h
@@ -288,7 +288,7 @@
 #else
     timeval t;
     gettimeofday(&t, NULL);
-    nCounter = t.tv_sec * 1000000 + t.tv_usec;
+    nCounter = (int64) t.tv_sec * 1000000 + t.tv_usec;
 #endif
     return nCounter;
 }