summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2013-02-27 10:22:28 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2013-02-27 10:53:49 +0100
commit01eff2488761ccfd5b2d57efe4523b4463f7e049 (patch)
tree93c25d0b36b817e77e747df4c1a909b74f87dcce
parentd06d4ab312d9294738df33ecdcfec0e6589196b0 (diff)
downloadrtems-01eff2488761ccfd5b2d57efe4523b4463f7e049.tar.bz2
IMFS: PR2093: Fix warning
-rw-r--r--cpukit/libfs/src/imfs/imfs_mknod.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_mknod.c b/cpukit/libfs/src/imfs/imfs_mknod.c
index 0344ad5684..d269d614af 100644
--- a/cpukit/libfs/src/imfs/imfs_mknod.c
+++ b/cpukit/libfs/src/imfs/imfs_mknod.c
@@ -32,8 +32,6 @@ static void get_type_and_info_by_mode_and_dev(
{
if ( S_ISDIR( mode ) ) {
*type = IMFS_DIRECTORY;
- } else if ( S_ISREG( mode ) ) {
- *type = IMFS_MEMORY_FILE;
} else if ( S_ISBLK( mode ) || S_ISCHR( mode ) ) {
*type = IMFS_DEVICE;
rtems_filesystem_split_dev_t(
@@ -44,7 +42,8 @@ static void get_type_and_info_by_mode_and_dev(
} else if (S_ISFIFO( mode )) {
*type = IMFS_FIFO;
} else {
- IMFS_assert( 0 );
+ IMFS_assert( S_ISREG( mode ) );
+ *type = IMFS_MEMORY_FILE;
}
}