aboutsummaryrefslogtreecommitdiff
path: root/nss
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 /nss
parentaebae0537dcb408100b88c6b7647a7e858c43237 (diff)
downloadglibc-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 'nss')
-rw-r--r--nss/makedb.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/nss/makedb.c b/nss/makedb.c
index 52d4ae35ad..e9b6af0fcb 100644
--- a/nss/makedb.c
+++ b/nss/makedb.c
@@ -167,8 +167,10 @@ static void reset_file_creation_context (void);
/* External functions. */
-extern void *xmalloc (size_t n) __attribute_malloc__;
-extern void *xcalloc (size_t n, size_t m) __attribute_malloc__;
+extern void *xmalloc (size_t n)
+ __attribute_malloc__ __attribute_alloc_size (1);
+extern void *xcalloc (size_t n, size_t s)
+ __attribute_malloc__ __attribute_alloc_size (1, 2);
int