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. --- locale/programs/locale.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'locale/programs/locale.c') diff --git a/locale/programs/locale.c b/locale/programs/locale.c index 579094d9a4..2cd4be8fb6 100644 --- a/locale/programs/locale.c +++ b/locale/programs/locale.c @@ -44,8 +44,9 @@ #include "charmap-dir.h" #include "../locarchive.h" -extern void *xmalloc (size_t __n); -extern char *xstrdup (const char *__str); +extern void *xmalloc (size_t n) + __attribute_malloc__ __attribute_alloc_size (1); +extern char *xstrdup (const char *) __attribute_malloc__; #define ARCHIVE_NAME LOCALEDIR "/locale-archive" -- cgit 1.4.1