diff options
author | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-04-03 04:50:46 +0200 |
---|---|---|
committer | Diego 'Flameeyes' Pettenò <flameeyes@gmail.com> | 2007-04-03 04:50:46 +0200 |
commit | 29de55140caf6b28a8147290436981dc90b90333 (patch) | |
tree | 280e230a5c06265e8159a9a0ba955c7c1f50c6ac /src/xine-utils/monitor.c | |
parent | 53e35bf59a7106fabd7d10e24190919e44dbf792 (diff) | |
parent | 2a1cde453a5a08542963c7a02443056e94249124 (diff) | |
download | xine-lib-29de55140caf6b28a8147290436981dc90b90333.tar.gz xine-lib-29de55140caf6b28a8147290436981dc90b90333.tar.bz2 |
Merge tonight's changes to main branch.
Diffstat (limited to 'src/xine-utils/monitor.c')
-rw-r--r-- | src/xine-utils/monitor.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/xine-utils/monitor.c b/src/xine-utils/monitor.c index 6d7cba367..1a348087c 100644 --- a/src/xine-utils/monitor.c +++ b/src/xine-utils/monitor.c @@ -33,7 +33,7 @@ #define MAX_ID 10 -#ifdef DEBUG +#ifndef NDEBUG static long long int profiler_times[MAX_ID] ; static long long int profiler_start[MAX_ID] ; @@ -74,8 +74,7 @@ __inline__ unsigned long long int rdtsc(void) #endif void xine_profiler_start_count (int id) { - - if ((unsigned)id >= MAX_ID) return; + if ( id >= MAX_ID || id < 0 ) return; #if defined(ARCH_X86) || defined(ARCH_X86_64) profiler_start[id] = rdtsc(); @@ -83,8 +82,7 @@ void xine_profiler_start_count (int id) { } void xine_profiler_stop_count (int id) { - - if ((unsigned)id >= MAX_ID) return; + if ( id >= MAX_ID || id < 0 ) return; #if defined(ARCH_X86) || defined(ARCH_X86_64) profiler_times[id] += rdtsc() - profiler_start[id]; |