diff options
author | Jim Meyering <jim@meyering.net> | 2003-07-23 05:38:36 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2003-07-23 05:38:36 +0000 |
commit | 0ff72c1f5c5b11a3f257d861e623ad02c8e02ff0 (patch) | |
tree | fb32e27cd705a6057ff020a2b83591e5c6d124e5 /lib | |
parent | a19486436f43e9f1ec49365f219f8e24d4a4bd2b (diff) | |
download | coreutils-0ff72c1f5c5b11a3f257d861e623ad02c8e02ff0.tar.xz |
(XCALLOC, XREALLOC, CCLONE): Fix under- and over-parenthesization in macros.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/xalloc.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/xalloc.h b/lib/xalloc.h index c7986f510..c6ca1174b 100644 --- a/lib/xalloc.h +++ b/lib/xalloc.h @@ -1,6 +1,7 @@ /* xalloc.h -- malloc with out-of-memory checking - Copyright (C) 1990-2000, 2003 Free Software Foundation, Inc. + Copyright (C) 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, + 1999, 2000, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -53,9 +54,8 @@ void *xrealloc (void *p, size_t n); char *xstrdup (const char *str); # 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)) +# 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) @@ -69,7 +69,7 @@ char *xstrdup (const char *str); /* Return a pointer to a malloc'ed copy of the array SRC of NUM elements. */ # define CCLONE(Src, Num) \ - (memcpy (xmalloc (sizeof (*Src) * (Num)), (Src), sizeof (*Src) * (Num))) + (memcpy (xmalloc (sizeof *(Src) * (Num)), Src, sizeof *(Src) * (Num))) /* Return a malloc'ed copy of SRC. */ # define CLONE(Src) CCLONE (Src, 1) |