From ec09c1c410d40386ec3e5d2d82fc5c378b4b2681 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 8 Jan 2012 21:19:43 -0500 Subject: Optimize xmalloc, xcalloc, xrealloc, and xstrdup Add alloc_size attribute and apply consistently the malloc attribute to xmalloc, xcalloc, xrealloc, and xstrdup. --- nss/makedb.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'nss/makedb.c') diff --git a/nss/makedb.c b/nss/makedb.c index 52d4ae3..e9b6af0 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 -- cgit v1.1