diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-06-24 21:31:22 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2010-06-24 21:31:22 +0000 |
commit | 983bfad2108c3cdd9f100c6f0d1cde00343056dc (patch) | |
tree | 131d133d84dc68a06f542b822d22a918533616c2 /cpukit/libfs/src/imfs/imfs_debug.c | |
parent | 2010-06-24 Gedare Bloom <giddyup44@yahoo.com> (diff) | |
download | rtems-983bfad2108c3cdd9f100c6f0d1cde00343056dc.tar.bz2 |
2010-06-24 Joel Sherrill <joel.sherrilL@OARcorp.com>
* 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.
Diffstat (limited to '')
-rw-r--r-- | cpukit/libfs/src/imfs/imfs_debug.c | 30 |
1 files changed, 15 insertions, 15 deletions
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 <assert.h> +#if defined(RTEMS_DEBUG) + #include <assert.h> +#endif #include <string.h> #include <fcntl.h> #include <errno.h> @@ -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; |