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 /nss/makedb.c | |
parent | aebae0537dcb408100b88c6b7647a7e858c43237 (diff) | |
download | glibc-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 'nss/makedb.c')
-rw-r--r-- | nss/makedb.c | 6 |
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 |