about summary refs log tree commit diff
path: root/string/strndup.c
diff options
context:
space:
mode:
Diffstat (limited to 'string/strndup.c')
-rw-r--r--string/strndup.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/string/strndup.c b/string/strndup.c
index 0bb6080262..98f497c7ed 100644
--- a/string/strndup.c
+++ b/string/strndup.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
+/* Copyright (C) 1996, 1997, 1998, 2001 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -42,8 +42,8 @@ __strndup (s, n)
      const char *s;
      size_t n;
 {
-  size_t len = strnlen (s, n);
-  char *new = malloc (len + 1);
+  size_t len = __strnlen (s, n);
+  char *new = (char *) malloc (len + 1);
 
   if (new == NULL)
     return NULL;