diff options
| author | Mark Murray <markm@FreeBSD.org> | 2002-02-03 19:11:32 +0000 |
|---|---|---|
| committer | Mark Murray <markm@FreeBSD.org> | 2002-02-03 19:11:32 +0000 |
| commit | 9052855a15171a46c21abfbc8ec54081a64092cd (patch) | |
| tree | 6da116fe07d933b01529a09b9b07d839dad4b952 /bin/ls/util.c | |
| parent | 0a7fe9cc0b390dc0a07acc1090055bc19c6339f3 (diff) | |
Notes
Diffstat (limited to 'bin/ls/util.c')
| -rw-r--r-- | bin/ls/util.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/bin/ls/util.c b/bin/ls/util.c index 39ee38281c2b..34b5b186651e 100644 --- a/bin/ls/util.c +++ b/bin/ls/util.c @@ -59,7 +59,7 @@ static const char rcsid[] = int prn_printable(const char *s) { - unsigned char c; + char c; int n; for (n = 0; (c = *s) != '\0'; ++s, ++n) @@ -83,13 +83,13 @@ prn_printable(const char *s) * DES 1998/04/23 */ -int +size_t len_octal(const char *s, int len) { - int r = 0; + size_t r = 0; while (len--) - if (isprint((unsigned char)*s++)) r++; else r += 4; + if (isprint((unsigned const char)*s++)) r++; else r += 4; return r; } @@ -99,8 +99,7 @@ prn_octal(const char *s) unsigned char ch; int len = 0; - while ((ch = *s++)) - { + while ((ch = (unsigned char)*s++)) { if (isprint(ch) && (ch != '\"') && (ch != '\\')) putchar(ch), len++; else if (f_octal_escape) { |
