diff options
author | Eric Andersen <andersen@codepoet.org> | 2001-03-21 10:34:27 +0300 |
---|---|---|
committer | Eric Andersen <andersen@codepoet.org> | 2001-03-21 10:34:27 +0300 |
commit | 1ca20a77476fb69e2472080ef6ba23c8c0ad12ad (patch) | |
tree | d1f07be4de0004fe5e30b44320e10285147e7944 /libbb/parse_mode.c | |
parent | 7447642a47c6a0aefd05f4acf730950a510634cd (diff) |
A nice patch from Larry Doolittle that adds -Wshadow and
cleans up most of the now-revealed problems.
Diffstat (limited to 'libbb/parse_mode.c')
-rw-r--r-- | libbb/parse_mode.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/libbb/parse_mode.c b/libbb/parse_mode.c index 33a878122..a68b7d3aa 100644 --- a/libbb/parse_mode.c +++ b/libbb/parse_mode.c @@ -50,8 +50,8 @@ extern int parse_mode(const char *s, mode_t * theMode) S_ISVTX /* t */ }; - static const char group_string[] = "ugoa"; - static const char mode_string[] = "rwxst"; + static const char group_chars[] = "ugoa"; + static const char mode_chars[] = "rwxst"; const char *p; @@ -74,9 +74,9 @@ extern int parse_mode(const char *s, mode_t * theMode) if ((c = *s++) == '\0') { return -1; } - for (p=group_string ; *p ; p++) { + for (p=group_chars ; *p ; p++) { if (*p == c) { - groups |= group_set[(int)(p-group_string)]; + groups |= group_set[(int)(p-group_chars)]; goto NEXT_GROUP; } } @@ -101,9 +101,9 @@ extern int parse_mode(const char *s, mode_t * theMode) NEXT_MODE: if (((c = *s++) != '\0') && (c != ',')) { - for (p=mode_string ; *p ; p++) { + for (p=mode_chars ; *p ; p++) { if (*p == c) { - mode |= mode_set[(int)(p-mode_string)]; + mode |= mode_set[(int)(p-mode_chars)]; goto NEXT_MODE; } } |