This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Mark __strndup with malloc attribute



We should mark the internal functions also, strndup is marked but
__strndup not.

Andreas

1999-12-19  Andreas Jaeger  <aj@suse.de>

	* include/string.h: Mark __strndup with __attribute_malloc__.

============================================================
Index: include/string.h
--- include/string.h	1999/11/24 20:47:38	1.8
+++ include/string.h	1999/12/19 13:12:51
@@ -14,7 +14,8 @@
 extern int __strncasecmp (__const char *__s1, __const char *__s2,
 			  size_t __n);
 
-extern char *__strndup (__const char *__string, size_t __n);
+extern char *__strndup (__const char *__string, size_t __n)
+     __attribute_malloc__;
 
 extern void *__rawmemchr (__const void *__s, int __c);
 

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.rhein-neckar.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]