diff options
author | Jim Meyering <jim@meyering.net> | 1997-11-12 16:11:17 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-11-12 16:11:17 +0000 |
commit | bfeca902c01d658b0bd888a94ac0fef49e53f6fc (patch) | |
tree | b886082acdde1f5072be6ad48bb5017dd760ae35 /lib/strndup.c | |
parent | 611f4e00f604ea13c373d877f3976d462f74a0a0 (diff) | |
download | gnulib-bfeca902c01d658b0bd888a94ac0fef49e53f6fc.tar.gz |
return memcpy result directly
Diffstat (limited to 'lib/strndup.c')
-rw-r--r-- | lib/strndup.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/strndup.c b/lib/strndup.c index a23060e381..f4b1f7ac13 100644 --- a/lib/strndup.c +++ b/lib/strndup.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1996 Free Software Foundation, Inc. +/* Copyright (C) 1996, 1997 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. @@ -42,8 +42,6 @@ strndup (s, n) if (new == NULL) return NULL; - memcpy (new, s, n); new[n] = '\0'; - - return new; + return memcpy (new, s, n); } |