This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[COMMITTED PATCH] Remove dead variable in generic strcpy.
- From: Roland McGrath <roland at hack dot frob dot com>
- To: "GNU C. Library" <libc-alpha at sourceware dot org>
- Date: Fri, 8 Feb 2013 10:48:44 -0800 (PST)
- Subject: [COMMITTED PATCH] Remove dead variable in generic strcpy.
This variable was used by the bounded-pointers code that was just removed.
When cleaning out cruft like the BP stuff, always keep an eye out for
nearby code that no longer makes sense after the removal.
Thanks,
Roland
* string/strcpy.c: Removed unused variable.
--- a/string/strcpy.c
+++ b/string/strcpy.c
@@ -30,7 +30,6 @@ strcpy (dest, src)
char c;
char *__unbounded s = (char *__unbounded) src;
const ptrdiff_t off = dest - s - 1;
- size_t n;
do
{
@@ -39,8 +38,6 @@ strcpy (dest, src)
}
while (c != '\0');
- n = s - src;
-
return dest;
}
libc_hidden_builtin_def (strcpy)