diff options
author | Jim Meyering <jim@meyering.net> | 1998-04-17 15:37:29 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1998-04-17 15:37:29 +0000 |
commit | 1187f5eb7f2c238c06e41ebf78e7bcceebe398f3 (patch) | |
tree | d21205e99838b7f06de27f81a8e3502cbdd95623 /src | |
parent | 5bcc1fd7fd9864c23cc2162ec846c1cbf066f72f (diff) | |
download | coreutils-1187f5eb7f2c238c06e41ebf78e7bcceebe398f3.tar.xz |
(xfields): Used unsigned char* pointers to avoid
Diffstat (limited to 'src')
-rw-r--r-- | src/join.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/join.c b/src/join.c index 7e0e1205a..733c58759 100644 --- a/src/join.c +++ b/src/join.c @@ -195,7 +195,7 @@ static void xfields (struct line *line) { int i; - register char *ptr, *lim; + unsigned char *ptr, *lim; ptr = line->beg; lim = line->lim; @@ -211,7 +211,7 @@ xfields (struct line *line) { if (tab) { - char *beg; + unsigned char *beg; beg = ptr; while (ptr < lim && *ptr != tab) @@ -222,7 +222,7 @@ xfields (struct line *line) } else { - char *beg; + unsigned char *beg; beg = ptr; while (ptr < lim && !ISSPACE (*ptr)) @@ -233,7 +233,8 @@ xfields (struct line *line) } } - if (ptr > line->beg && ((tab && ISSPACE (ptr[-1])) || ptr[-1] == tab)) + if ((char *) ptr > line->beg + && ((tab && ISSPACE (ptr[-1])) || ptr[-1] == tab)) { /* Add one more (empty) field because the last character of the line was a delimiter. */ |