diff options
Diffstat (limited to 'cpukit/libmisc/shell/main_chmod.c')
-rw-r--r-- | cpukit/libmisc/shell/main_chmod.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/cpukit/libmisc/shell/main_chmod.c b/cpukit/libmisc/shell/main_chmod.c index 044e48389a..053da1d5a3 100644 --- a/cpukit/libmisc/shell/main_chmod.c +++ b/cpukit/libmisc/shell/main_chmod.c @@ -28,15 +28,18 @@ #include <rtems/shell.h> #include "internal.h" -int rtems_shell_main_chmod(int argc,char *argv[]) +int rtems_shell_main_chmod( + int argc, + char *argv[] +) { int n; mode_t mode; - if (argc > 2){ - mode = rtems_shell_str2int(argv[1])&0777; + if (argc > 2) { + mode = rtems_shell_str2int(argv[1]) & 0777; n = 2; - while (n<argc) + while (n < argc) chmod(argv[n++], mode); } return 0; |