[RTEMS 5 PATCH 1/3] libmisc/shell/chmod: Fix multiple file arguments to the command

chrisj at rtems.org chrisj at rtems.org
Mon Jan 30 03:15:09 UTC 2023


From: Chris Johns <chrisj at rtems.org>

Closes #4558
---
 cpukit/libmisc/shell/main_chmod.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cpukit/libmisc/shell/main_chmod.c b/cpukit/libmisc/shell/main_chmod.c
index 0c39072f6b..288fd52f4c 100644
--- a/cpukit/libmisc/shell/main_chmod.c
+++ b/cpukit/libmisc/shell/main_chmod.c
@@ -53,7 +53,7 @@ static int rtems_shell_main_chmod(
    *  Now change the files modes
    */
   for (n=2 ; n < argc ; n++)
-    chmod(argv[n++], mode);
+    chmod(argv[n], mode);
 
   return 0;
 }
-- 
2.37.1



More information about the devel mailing list