about summary refs log tree commit diff
path: root/sysdeps/unix/sysv/linux/dl-origin.c
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix/sysv/linux/dl-origin.c')
-rw-r--r--sysdeps/unix/sysv/linux/dl-origin.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sysdeps/unix/sysv/linux/dl-origin.c b/sysdeps/unix/sysv/linux/dl-origin.c
index 052b9ed110..139022b02c 100644
--- a/sysdeps/unix/sysv/linux/dl-origin.c
+++ b/sysdeps/unix/sysv/linux/dl-origin.c
@@ -62,13 +62,13 @@ _dl_get_origin (void)
 	 a copy and strip out trailing slashes.  */
       if (GLRO(dl_origin_path) != NULL)
 	{
-	  size_t len = strlen (GLRO(dl_origin_path));
-	  result = (char *) malloc (len + 1);
+	  size_t path_len = strlen (GLRO(dl_origin_path));
+	  result = (char *) malloc (path_len + 1);
 	  if (result == NULL)
 	    result = (char *) -1;
 	  else
 	    {
-	      char *cp = __mempcpy (result, GLRO(dl_origin_path), len);
+	      char *cp = __mempcpy (result, GLRO(dl_origin_path), path_len);
 	      while (cp > result + 1 && cp[-1] == '/')
 		--cp;
 	      *cp = '\0';