diff options
author | Jim Meyering <jim@meyering.net> | 1996-05-16 03:55:44 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1996-05-16 03:55:44 +0000 |
commit | fce70ef38b611f95ceae183651bcfa1eecf4dadf (patch) | |
tree | 8f330d4ea647d1084914ffcb6454dc088cf24219 | |
parent | 9622bd6207427eeec104591f20138a5ea66bd572 (diff) | |
download | coreutils-fce70ef38b611f95ceae183651bcfa1eecf4dadf.tar.xz |
(describe_change): Declare pointer parameters to be const.
(change_file_mode): Likewise.
(change_dir_mode): Likewise.
-rw-r--r-- | src/chmod.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/chmod.c b/src/chmod.c index b7a11ad80..518e7fa1a 100644 --- a/src/chmod.c +++ b/src/chmod.c @@ -38,8 +38,9 @@ void strip_trailing_slashes (); char *xmalloc (); char *xrealloc (); -static int change_dir_mode __P ((char *dir, struct mode_change *changes, - struct stat *statp)); +static int change_dir_mode __P ((const char *dir, + const struct mode_change *changes, + const struct stat *statp)); /* The name the program was run with. */ char *program_name; @@ -78,7 +79,7 @@ static struct option const long_options[] = if CHANGED is zero, FILE had that mode already. */ static void -describe_change (char *file, short unsigned int mode, int changed) +describe_change (const char *file, short unsigned int mode, int changed) { char perms[11]; /* "-rwxrwxrwx" ls-style modes. */ @@ -98,7 +99,8 @@ describe_change (char *file, short unsigned int mode, int changed) links. Return 0 if successful, 1 if errors occurred. */ static int -change_file_mode (char *file, struct mode_change *changes, int deref_symlink) +change_file_mode (const char *file, const struct mode_change *changes, + const int deref_symlink) { struct stat file_stats; unsigned short newmode; @@ -152,7 +154,8 @@ change_file_mode (char *file, struct mode_change *changes, int deref_symlink) Return 0 if successful, 1 if errors occurred. */ static int -change_dir_mode (char *dir, struct mode_change *changes, struct stat *statp) +change_dir_mode (const char *dir, const struct mode_change *changes, + const struct stat *statp) { char *name_space, *namep; char *path; /* Full path of each entry to process. */ |