summaryrefslogtreecommitdiff
path: root/src/cut.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-10-25 04:37:57 +0000
committerJim Meyering <jim@meyering.net>1997-10-25 04:37:57 +0000
commit7dcae67d92955ce049330ec906445c574892ed06 (patch)
treeec8450f5c61b48ae28f44adcf819f76f75db1207 /src/cut.c
parent866a9c5e2d7dc956c53cbef4828870bd642a1e90 (diff)
downloadcoreutils-7dcae67d92955ce049330ec906445c574892ed06.tar.xz
(ADD_RANGE_PAIR): Cast first arg of xrealloc to char*.
(getstr): Cast xmalloc return value to char*. (xmalloc): Remove decl. (xrealloc): Remove decl.
Diffstat (limited to 'src/cut.c')
-rw-r--r--src/cut.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/cut.c b/src/cut.c
index d8cdcfe56..f5a79df59 100644
--- a/src/cut.c
+++ b/src/cut.c
@@ -1,5 +1,5 @@
/* cut - remove parts of lines of files
- Copyright (C) 1984 by David M. Ihnat
+ Copyright (C) 1984, 1997 by David M. Ihnat
This program is a total rewrite of the Bell Laboratories Unix(Tm)
command of the same name, as of System V. It contains no proprietary
@@ -92,7 +92,7 @@
if (n_rp >= n_rp_allocated) \
{ \
n_rp_allocated *= 2; \
- (rp) = (struct range_pair *) xrealloc ((rp), \
+ (rp) = (struct range_pair *) xrealloc ((char *) (rp), \
n_rp_allocated * sizeof (*(rp))); \
} \
rp[n_rp].lo = (low); \
@@ -107,9 +107,6 @@ struct range_pair
unsigned int hi;
};
-char *xmalloc ();
-char *xrealloc ();
-
/* This buffer is used to support the semantics of the -s option
(or lack of same) when the specified field list includes (does
not include) the first field. In both of those cases, the entire
@@ -253,7 +250,7 @@ getstr (char **lineptr, int *n, FILE *stream, char terminator)
if (!*lineptr)
{
*n = MIN_CHUNK;
- *lineptr = xmalloc (*n);
+ *lineptr = (char *) xmalloc (*n);
if (!*lineptr)
return -1;
}