Mon Jul 1 12:29:50 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
authorroland <roland>
Mon, 1 Jul 1996 22:16:13 +0000 (22:16 +0000)
committerroland <roland>
Mon, 1 Jul 1996 22:16:13 +0000 (22:16 +0000)
* string/string.h (strndupa): Pass missing arg to strnlen.

string/string.h

index 7dbcc41..da26a6f 100644 (file)
@@ -108,7 +108,7 @@ extern char *strndup __P ((__const char *__string, size_t __n));
 ({                                                                           \
   __const char *__old = (s);                                                 \
   char *__new;                                                               \
-  size_t __len = strnlen (__old);                                            \
+  size_t __len = strnlen (__old, (n));                                       \
   __new = memcpy (__builtin_alloca (__len + 1), __old, __len);               \
   __new[__len] = '\0';                                                       \
   __new;                                                                     \