summaryrefslogtreecommitdiff
path: root/elf/pldd.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@gmail.com>2012-01-08 21:19:43 -0500
committerUlrich Drepper <drepper@gmail.com>2012-01-08 21:19:43 -0500
commitec09c1c410d40386ec3e5d2d82fc5c378b4b2681 (patch)
tree2189714f7efcfc502ddef885c7c1d541eae6684c /elf/pldd.c
parentaebae0537dcb408100b88c6b7647a7e858c43237 (diff)
downloadglibc-ec09c1c410d40386ec3e5d2d82fc5c378b4b2681.tar.gz
Optimize xmalloc, xcalloc, xrealloc, and xstrdup
Add alloc_size attribute and apply consistently the malloc attribute to xmalloc, xcalloc, xrealloc, and xstrdup.
Diffstat (limited to 'elf/pldd.c')
-rw-r--r--elf/pldd.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/elf/pldd.c b/elf/pldd.c
index 255326ef70..51a3f440b6 100644
--- a/elf/pldd.c
+++ b/elf/pldd.c
@@ -44,8 +44,10 @@ extern char *program_invocation_short_name;
#define PACKAGE _libc_intl_domainname
/* External functions. */
-extern void *xmalloc (size_t n);
-extern void *xrealloc (void *p, size_t n);
+extern void *xmalloc (size_t n)
+ __attribute_malloc__ __attribute_alloc_size (1);
+extern void *xrealloc (void *o, size_t n)
+ __attribute_malloc__ __attribute_alloc_size (2);
/* Name and version of program. */
static void print_version (FILE *stream, struct argp_state *state);