summaryrefslogtreecommitdiff
path: root/lib/exclude.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2003-04-11 12:20:35 +0000
committerJim Meyering <jim@meyering.net>2003-04-11 12:20:35 +0000
commit58b92bbeb23db76f96843e8a6784940fe0d902b2 (patch)
tree00bc3b6883550af46200926702de211820a40b1c /lib/exclude.c
parent9def4be367ef67f9e5064ac5a0d20cf5e41f4285 (diff)
downloadcoreutils-58b92bbeb23db76f96843e8a6784940fe0d902b2.tar.xz
Remove anachronistic casts of xmalloc, xrealloc, and xcalloc return values.
Diffstat (limited to 'lib/exclude.c')
-rw-r--r--lib/exclude.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/exclude.c b/lib/exclude.c
index d2c6502df..0de08dea5 100644
--- a/lib/exclude.c
+++ b/lib/exclude.c
@@ -104,10 +104,10 @@ struct exclude
struct exclude *
new_exclude (void)
{
- struct exclude *ex = (struct exclude *) xmalloc (sizeof *ex);
+ struct exclude *ex = xmalloc (sizeof *ex);
ex->exclude_count = 0;
ex->exclude_alloc = (1 << 6); /* This must be a power of 2. */
- ex->exclude = (struct patopts *) xmalloc (ex->exclude_alloc
+ ex->exclude = xmalloc (ex->exclude_alloc
* sizeof ex->exclude[0]);
return ex;
}
@@ -206,8 +206,7 @@ add_exclude (struct exclude *ex, char const *pattern, int options)
if (! (0 < s && s <= SIZE_MAX / sizeof ex->exclude[0]))
xalloc_die ();
ex->exclude_alloc = s;
- ex->exclude = (struct patopts *) xrealloc (ex->exclude,
- s * sizeof ex->exclude[0]);
+ ex->exclude = xrealloc (ex->exclude, s * sizeof ex->exclude[0]);
}
patopts = &ex->exclude[ex->exclude_count++];