summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-04-12 09:12:21 +0000
committerJim Meyering <jim@meyering.net>1998-04-12 09:12:21 +0000
commit7154d646cb343aa28459ffbfb5a1ca7057f3c8d7 (patch)
tree24ca75366da3bff9f7d8e1a4960aa6bfe35ed344
parentb388203a65251b73dba040148039914062685c88 (diff)
downloadcoreutils-7154d646cb343aa28459ffbfb5a1ca7057f3c8d7.tar.xz
(wc): Declare per-file counters and `linepos' to be of type uintmax_t.
Declare bytes_read to be ssize_t.
-rw-r--r--src/wc.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/wc.c b/src/wc.c
index da05631a8..94079684d 100644
--- a/src/wc.c
+++ b/src/wc.c
@@ -137,9 +137,9 @@ static void
wc (int fd, const char *file)
{
char buf[BUFFER_SIZE + 1];
- register int bytes_read;
- register int in_word = 0;
- register unsigned long lines, words, chars, linelength;
+ ssize_t bytes_read;
+ int in_word = 0;
+ uintmax_t lines, words, chars, linelength;
lines = words = chars = linelength = 0;
@@ -203,11 +203,11 @@ wc (int fd, const char *file)
}
else
{
- register unsigned long linepos = 0;
+ uintmax_t linepos = 0;
while ((bytes_read = safe_read (fd, buf, BUFFER_SIZE)) > 0)
{
- register char *p = buf;
+ const char *p = buf;
chars += bytes_read;
do