From: Jim Meyering Date: Fri, 11 Apr 2003 11:59:11 +0000 (+0000) Subject: (XMALLOC, XCALLOC, XREALLOC): Remove unnecessary casts. X-Git-Tag: v5.0.1~726 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=aa321686198635ce0956d3fe32827d175d372ecd;p=thirdparty%2Fcoreutils.git (XMALLOC, XCALLOC, XREALLOC): Remove unnecessary casts. --- diff --git a/lib/xalloc.h b/lib/xalloc.h index 6be7c9ce83..b176ec668c 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)