Mercurial > hg > octave-kai > gnulib-hg
diff lib/exclude.c @ 4350:766682dd672e
(new_exclude, add_exclude): Remove casts that are
unnecessary now that we assume C89 or better. This change
imported from coreutils.
author | Paul Eggert <eggert@cs.ucla.edu> |
---|---|
date | Wed, 04 Jun 2003 23:35:46 +0000 |
parents | df44e79ce676 |
children | 940fdf291f5b |
line wrap: on
line diff
--- a/lib/exclude.c +++ b/lib/exclude.c @@ -98,11 +98,10 @@ 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 - * sizeof ex->exclude[0]); + ex->exclude = xmalloc (ex->exclude_alloc * sizeof ex->exclude[0]); return ex; } @@ -200,8 +199,7 @@ 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++];