aboutsummaryrefslogtreecommitdiff
path: root/string/strndup.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-08-30 23:22:02 +0000
committerUlrich Drepper <drepper@redhat.com>2001-08-30 23:22:02 +0000
commit5a3fba993001f71d2c50a1ea59dcc75a721b7ccd (patch)
treea1323cee4e72eaba3d1b8b2556c395a17557783d /string/strndup.c
parentee0cb67ec23814094bdc7ef973bd48f2ae7c649d (diff)
downloadglibc-5a3fba993001f71d2c50a1ea59dcc75a721b7ccd.tar
glibc-5a3fba993001f71d2c50a1ea59dcc75a721b7ccd.tar.gz
glibc-5a3fba993001f71d2c50a1ea59dcc75a721b7ccd.tar.bz2
glibc-5a3fba993001f71d2c50a1ea59dcc75a721b7ccd.zip
Update.
2001-08-30 Ulrich Drepper <drepper@redhat.com> * string/argz-stringify.c (__argz_stringify): Use __strnlen instead of strnlen. * include/string.h (strndupa): Redefine here to use __strnlen instead of strnlen. * string/strndup.c (__strndup): Use __strnlen not strnlen. * misc/syslog.c (vsyslog): Fix typo in last change (connect -> connected).
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;