]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(XMALLOC, XCALLOC, XREALLOC): Remove unnecessary casts.
authorJim Meyering <jim@meyering.net>
Fri, 11 Apr 2003 11:59:11 +0000 (11:59 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 11 Apr 2003 11:59:11 +0000 (11:59 +0000)
lib/xalloc.h

index 6be7c9ce83df5f8f567ff40909d8b63ae0d8500b..b176ec668c5e455a1475b94b6f62b4e12b5bd815 100644 (file)
@@ -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)