diff options
author | Jim Meyering <jim@meyering.net> | 2003-04-11 11:59:11 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-04-11 11:59:11 +0000 |
commit | aa321686198635ce0956d3fe32827d175d372ecd (patch) | |
tree | a467d0a9b9a6dc555d8cab869ecedf98ea51da0c /lib | |
parent | 0bf873ccfb475602c3c728e5f0bfb2d58158795a (diff) | |
download | coreutils-aa321686198635ce0956d3fe32827d175d372ecd.tar.xz |
(XMALLOC, XCALLOC, XREALLOC): Remove unnecessary casts.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/xalloc.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/xalloc.h b/lib/xalloc.h index 6be7c9ce8..b176ec668 100644 --- a/lib/xalloc.h +++ b/lib/xalloc.h @@ -53,10 +53,10 @@ void *xcalloc (size_t n, size_t s); void *xrealloc (void *p, size_t n); char *xstrdup (const char *str); -# define XMALLOC(Type, N_items) ((Type *) xmalloc (sizeof (Type) * (N_items))) -# define XCALLOC(Type, N_items) ((Type *) xcalloc (sizeof (Type), (N_items))) -# define XREALLOC(Ptr, Type, N_items) \ - ((Type *) xrealloc ((void *) (Ptr), sizeof (Type) * (N_items))) +# define XMALLOC(Type, N_items) (xmalloc (sizeof (Type) * (N_items))) +# define XCALLOC(Type, N_items) (xcalloc (sizeof (Type), (N_items))) +# define XREALLOC(Ptr, Type, N_items) (xrealloc ((Ptr), \ + sizeof (Type) * (N_items))) /* Declare and alloc memory for VAR of type TYPE. */ # define NEW(Type, Var) Type *(Var) = XMALLOC (Type, 1) |