Mark __strndup with malloc attribute

Andreas Jaeger aj@suse.de
Sun Dec 19 05:19:00 GMT 1999


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


More information about the Libc-hacker mailing list