diff options
author | Ulrich Drepper <drepper@gmail.com> | 2012-01-08 21:19:43 -0500 |
---|---|---|
committer | Ulrich Drepper <drepper@gmail.com> | 2012-01-08 21:19:43 -0500 |
commit | ec09c1c410d40386ec3e5d2d82fc5c378b4b2681 (patch) | |
tree | 2189714f7efcfc502ddef885c7c1d541eae6684c /elf/pldd.c | |
parent | aebae0537dcb408100b88c6b7647a7e858c43237 (diff) | |
download | glibc-ec09c1c410d40386ec3e5d2d82fc5c378b4b2681.tar glibc-ec09c1c410d40386ec3e5d2d82fc5c378b4b2681.tar.gz glibc-ec09c1c410d40386ec3e5d2d82fc5c378b4b2681.tar.bz2 glibc-ec09c1c410d40386ec3e5d2d82fc5c378b4b2681.zip |
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.c | 6 |
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); |