summaryrefslogtreecommitdiffstats
path: root/cpukit
diff options
context:
space:
mode:
authorRalf Corsepius <ralf.corsepius@rtems.org>2010-05-28 15:16:39 +0000
committerRalf Corsepius <ralf.corsepius@rtems.org>2010-05-28 15:16:39 +0000
commit8f4ceebd82a41d264e755cc9a0d6fd08de404af6 (patch)
tree8e19bc0789b347976d5a9df03ee5e9b79788f8a6 /cpukit
parent2010-05-28 Ralf Corsépius <ralf.corsepius@rtems.org> (diff)
downloadrtems-8f4ceebd82a41d264e755cc9a0d6fd08de404af6.tar.bz2
2010-05-28 Ralf Corsépius <ralf.corsepius@rtems.org>
* libfs/src/rfs/rtems-rfs-rtems.c: Use size_t for node_len.
Diffstat (limited to 'cpukit')
-rw-r--r--cpukit/ChangeLog4
-rw-r--r--cpukit/libfs/src/rfs/rtems-rfs-rtems.c6
2 files changed, 7 insertions, 3 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog
index 633c71f7d8..dbc4830f04 100644
--- a/cpukit/ChangeLog
+++ b/cpukit/ChangeLog
@@ -1,3 +1,7 @@
+2010-05-28 Ralf Corsépius <ralf.corsepius@rtems.org>
+
+ * libfs/src/rfs/rtems-rfs-rtems.c: Use size_t for node_len.
+
2010-05-27 Ralf Corsépius <ralf.corsepius@rtems.org>
* libnetworking/libc/gethostnamadr.c:
diff --git a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
index ac102afd1a..f50af413fa 100644
--- a/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
+++ b/cpukit/libfs/src/rfs/rtems-rfs-rtems.c
@@ -67,7 +67,7 @@ rtems_rfs_rtems_eval_path (const char* path,
rtems_rfs_ino ino = rtems_rfs_rtems_get_pathloc_ino (pathloc);
uint32_t doff = 0;
const char* node;
- int node_len;
+ size_t node_len;
int stripped;
int rc;
@@ -120,7 +120,7 @@ rtems_rfs_rtems_eval_path (const char* path,
node_len = 0;
while (!rtems_filesystem_is_separator (*path) &&
(*path != '\0') && pathlen &&
- (node_len < (rtems_rfs_fs_max_name (fs) - 1)))
+ (node_len + 1 < rtems_rfs_fs_max_name (fs)))
{
path++;
pathlen--;
@@ -159,7 +159,7 @@ rtems_rfs_rtems_eval_path (const char* path,
if (ino == RTEMS_RFS_ROOT_INO)
{
if (rtems_rfs_rtems_trace (RTEMS_RFS_RTEMS_DEBUG_EVAL_PATH))
- printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%d)\n",
+ printf("rtems-rfs-rtems: eval-path: crossmount: path:%s (%zd)\n",
path - node_len, pathlen + node_len);
rtems_rfs_inode_close (fs, &inode);
rtems_rfs_rtems_unlock (fs);