This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch master updated. glibc-2.20-425-gf559d8c
- From: eggert at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 23 Dec 2014 16:58:26 -0000
- Subject: GNU C Library master sources branch master updated. glibc-2.20-425-gf559d8c
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via f559d8cf2963868a2493289b17be68f3786c789e (commit)
from 7d81e8d6db95c112c297930a8f2f9617c305529a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=f559d8cf2963868a2493289b17be68f3786c789e
commit f559d8cf2963868a2493289b17be68f3786c789e
Author: Richard Earnshaw <rearnsha@arm.com>
Date: Tue Dec 23 08:57:07 2014 -0800
* string/stpcpy.c (__stpcpy): Rewrite using strlen and memcpy.
diff --git a/ChangeLog b/ChangeLog
index 2b6f0ad..9ed06fd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-12-23 Richard Earnshaw <rearnsha@arm.com>
+
+ * string/stpcpy.c (__stpcpy): Rewrite using strlen and memcpy.
+
2014-12-23 Florian Weimer <fweimer@redhat.com>
* iconvdata/run-iconv-test.sh: Actually test iconv modules.
diff --git a/string/stpcpy.c b/string/stpcpy.c
index 9185acc..fd6eb1c 100644
--- a/string/stpcpy.c
+++ b/string/stpcpy.c
@@ -35,14 +35,8 @@ __stpcpy (dest, src)
char *dest;
const char *src;
{
- char *d = dest;
- const char *s = src;
-
- do
- *d++ = *s;
- while (*s++ != '\0');
-
- return d - 1;
+ size_t len = strlen (src);
+ return memcpy (dest, src, len + 1) + len;
}
#ifdef libc_hidden_def
libc_hidden_def (__stpcpy)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 4 ++++
string/stpcpy.c | 10 ++--------
2 files changed, 6 insertions(+), 8 deletions(-)
hooks/post-receive
--
GNU C Library master sources