From 8f4ceebd82a41d264e755cc9a0d6fd08de404af6 Mon Sep 17 00:00:00 2001 From: Ralf Corsepius Date: Fri, 28 May 2010 15:16:39 +0000 Subject: [PATCH] =?UTF-8?q?2010-05-28=09Ralf=20Cors=C3=A9pius=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * libfs/src/rfs/rtems-rfs-rtems.c: Use size_t for node_len. --- cpukit/ChangeLog | 4 ++++ cpukit/libfs/src/rfs/rtems-rfs-rtems.c | 6 +++--- 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 + + * libfs/src/rfs/rtems-rfs-rtems.c: Use size_t for node_len. + 2010-05-27 Ralf Corsépius * 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);