[rtems commit] IMFS: PR2093: Fix warning
Sebastian Huber
sebh at rtems.org
Wed Feb 27 09:49:27 UTC 2013
Module: rtems
Branch: master
Commit: 01eff2488761ccfd5b2d57efe4523b4463f7e049
Changeset: http://git.rtems.org/rtems/commit/?id=01eff2488761ccfd5b2d57efe4523b4463f7e049
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Wed Feb 27 10:22:28 2013 +0100
IMFS: PR2093: Fix warning
---
cpukit/libfs/src/imfs/imfs_mknod.c | 5 ++---
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 0344ad5..d269d61 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;
}
}
More information about the vc
mailing list