summaryrefslogtreecommitdiff
path: root/src/xine-utils/monitor.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/xine-utils/monitor.c')
-rw-r--r--src/xine-utils/monitor.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/xine-utils/monitor.c b/src/xine-utils/monitor.c
index 6d7cba367..803d4ecdd 100644
--- a/src/xine-utils/monitor.c
+++ b/src/xine-utils/monitor.c
@@ -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];