This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]