summaryrefslogtreecommitdiffstats
path: root/cpukit/libfs/src/imfs/imfs_stat.c
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2015-01-31 21:27:01 +0100
committerSebastian Huber <sebastian.huber@embedded-brains.de>2015-02-04 19:31:55 +0100
commit924cbd4f42c8284899523903934d5db785919fdc (patch)
tree5e253e3620c49ae0e6c773c9d6abb6c0c16bba7d /cpukit/libfs/src/imfs/imfs_stat.c
parentIMFS: Use rtems_filesystem_make_dev_t_from_pointer (diff)
downloadrtems-924cbd4f42c8284899523903934d5db785919fdc.tar.bz2
IMFS: Simplify ino generation
The type of ino_t is unsigned long, so it can store a pointer. Avoid a potential integer overflow.
Diffstat (limited to '')
-rw-r--r--cpukit/libfs/src/imfs/imfs_stat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpukit/libfs/src/imfs/imfs_stat.c b/cpukit/libfs/src/imfs/imfs_stat.c
index 3d07fe8092..c0298b16d8 100644
--- a/cpukit/libfs/src/imfs/imfs_stat.c
+++ b/cpukit/libfs/src/imfs/imfs_stat.c
@@ -34,7 +34,7 @@ int IMFS_stat(
buf->st_dev = rtems_filesystem_make_dev_t_from_pointer( fs_info );
buf->st_mode = the_jnode->st_mode;
buf->st_nlink = the_jnode->st_nlink;
- buf->st_ino = the_jnode->st_ino;
+ buf->st_ino = IMFS_node_to_ino( the_jnode );
buf->st_uid = the_jnode->st_uid;
buf->st_gid = the_jnode->st_gid;