From 983bfad2108c3cdd9f100c6f0d1cde00343056dc Mon Sep 17 00:00:00 2001 From: Joel Sherrill Date: Thu, 24 Jun 2010 21:31:22 +0000 Subject: 2010-06-24 Joel Sherrill * libfs/src/imfs/imfs_creat.c, libfs/src/imfs/imfs_debug.c, libfs/src/imfs/imfs_directory.c, libfs/src/imfs/imfs_eval.c, libfs/src/imfs/imfs_fsunmount.c, libfs/src/imfs/imfs_getchild.c, libfs/src/imfs/imfs_initsupp.c, libfs/src/imfs/ioman.c, libfs/src/imfs/memfile.c: Evaluate all assert calls in IMFS. Either made them conditional on RTEMS_DEBUG or eliminated them. --- cpukit/libfs/src/imfs/imfs_debug.c | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'cpukit/libfs/src/imfs/imfs_debug.c') diff --git a/cpukit/libfs/src/imfs/imfs_debug.c b/cpukit/libfs/src/imfs/imfs_debug.c index eb7541bb6a..5c5db89941 100644 --- a/cpukit/libfs/src/imfs/imfs_debug.c +++ b/cpukit/libfs/src/imfs/imfs_debug.c @@ -15,7 +15,9 @@ #include "config.h" #endif -#include +#if defined(RTEMS_DEBUG) + #include +#endif #include #include #include @@ -53,7 +55,9 @@ void IMFS_print_jnode( IMFS_jnode_t *the_jnode ) { - assert( the_jnode ); + #if defined(RTEMS_DEBUG) + assert( the_jnode ); + #endif fprintf(stdout, "%s", the_jnode->name ); switch( the_jnode->type ) { @@ -90,23 +94,19 @@ void IMFS_print_jnode( case IMFS_HARD_LINK: fprintf(stdout, " links not printed\n" ); - assert(0); - break; + return; case IMFS_SYM_LINK: fprintf(stdout, " links not printed\n" ); - assert(0); - break; + return; case IMFS_FIFO: fprintf(stdout, " FIFO not printed\n" ); - assert(0); - break; + return; default: fprintf(stdout, " bad type %d\n", the_jnode->type ); - assert(0); - break; + return; } puts(""); } @@ -129,11 +129,11 @@ void IMFS_dump_directory( IMFS_jnode_t *the_jnode; int i; - assert( the_directory ); - - assert( level >= 0 ); - - assert( the_directory->type == IMFS_DIRECTORY ); + #if defined(RTEMS_DEBUG) + assert( the_directory ); + assert( level >= 0 ); + assert( the_directory->type == IMFS_DIRECTORY ); + #endif the_chain = &the_directory->info.directory.Entries; -- cgit v1.2.3