From 4e3d9b8a846f141621c4baa64707c895960b1154 Mon Sep 17 00:00:00 2001 From: Sebastian Huber Date: Tue, 23 Nov 2010 14:59:05 +0000 Subject: 2010-11-23 Sebastian Huber * score/src/iterateoverthreads.c, libmisc/cpuuse/cpuusagereport.c: Fixed NULL pointer access in case POSIX API is disabled. --- cpukit/libmisc/cpuuse/cpuusagereport.c | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'cpukit/libmisc') diff --git a/cpukit/libmisc/cpuuse/cpuusagereport.c b/cpukit/libmisc/cpuuse/cpuusagereport.c index 79ac92e7b2..b46aab7c35 100644 --- a/cpukit/libmisc/cpuuse/cpuusagereport.c +++ b/cpukit/libmisc/cpuuse/cpuusagereport.c @@ -72,12 +72,10 @@ void rtems_cpu_usage_report_with_plugin( #else for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { /* - * Since the removal of ITRON, this cannot occur. + * Since POSIX is optional, this can occur. */ - #if defined(RTEMS_DEBUG) - if ( !_Objects_Information_table[ api_index ] ) - continue; - #endif + if ( !_Objects_Information_table[ api_index ] ) + continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { @@ -106,12 +104,10 @@ void rtems_cpu_usage_report_with_plugin( for ( api_index = 1 ; api_index <= OBJECTS_APIS_LAST ; api_index++ ) { /* - * Since the removal of ITRON, this cannot occur. + * Since POSIX is optional, this can occur. */ - #if defined(RTEMS_DEBUG) - if ( !_Objects_Information_table[ api_index ] ) - continue; - #endif + if ( !_Objects_Information_table[ api_index ] ) + continue; information = _Objects_Information_table[ api_index ][ 1 ]; if ( information ) { -- cgit v1.2.3