[rtems commit] rtems_shell_main_chmod: Correct argument indexing
    Joel Sherrill 
    joel at rtems.org
       
    Mon Dec 26 19:37:07 UTC 2022
    
    
  
Module:    rtems
Branch:    master
Commit:    c8c713c6bdd73aa1d491f0f42bb5236e927e5f03
Changeset: http://git.rtems.org/rtems/commit/?id=c8c713c6bdd73aa1d491f0f42bb5236e927e5f03
Author:    zack leung <zakthertemsdev at gmail.com>
Date:      Sun Dec 25 21:40:57 2022 -0500
rtems_shell_main_chmod: Correct argument indexing
Closes #4751
---
 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 1f646d92d4..9a42cbd940 100644
--- a/cpukit/libmisc/shell/main_chmod.c
+++ b/cpukit/libmisc/shell/main_chmod.c
@@ -56,7 +56,7 @@ static int rtems_shell_main_chmod(
    *  Now change the files modes
    */
   for (n=2 ; n < argc ; n++) {
-    sc = chmod(argv[n++], mode);
+    sc = chmod(argv[n], mode);
     _Assert_Unused_variable_unequal(sc, -1);
   }
 
    
    
More information about the vc
mailing list