Fixed overflow issue. Code originally meant to truncate the 64 bit integer did not...
authorSampo Savolainen <v2@iki.fi>
Mon, 22 Sep 2008 20:44:46 +0000 (20:44 +0000)
committerSampo Savolainen <v2@iki.fi>
Mon, 22 Sep 2008 20:44:46 +0000 (20:44 +0000)
git-svn-id: svn://localhost/ardour2/branches/3.0@3793 d708f5d6-7413-0410-9779-e7cbd77b26cf

libs/ardour/ardour/cycles.h

index 0d1ac154dde746a474cefd3c00e8b78c6ad232d5..2199a2eb9cfc096a2f724287a713032954bbfae2 100644 (file)
@@ -48,10 +48,10 @@ extern cycles_t cacheflush_time;
 
 static inline cycles_t get_cycles (void)
 {
-       uint32_t long ret;
+       cycles_t ret;
 
        rdtscll(ret);
-       return ret;
+       return ret & 0xffffffff;
 }
 
 #elif defined(__powerpc__)