fa3bfd
commit 4712799fbb6812cc73f7bd9c8faa6e7b05c0f5ab
fa3bfd
Author: Siddhesh Poyarekar <siddhesh@redhat.com>
fa3bfd
Date:   Wed Nov 20 18:19:57 2013 +0530
fa3bfd
fa3bfd
    Fix build warning in locarchive.c
fa3bfd
fa3bfd
(With an adjustment for the non-upstream version of
fa3bfd
glibc-rh1296297-1.patch.)
fa3bfd
fa3bfd
diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c
fa3bfd
index dd4a5d147f46b0d4..1eae271186bc80a9 100644
fa3bfd
--- a/locale/programs/locarchive.c
fa3bfd
+++ b/locale/programs/locarchive.c
fa3bfd
@@ -521,7 +521,7 @@ open_archive (struct locarhandle *ah, bool readonly)
fa3bfd
   int retry = 0;
fa3bfd
   size_t prefix_len = output_prefix ? strlen (output_prefix) : 0;
fa3bfd
   char fname[prefix_len + sizeof (ARCHIVE_NAME)];
fa3bfd
-  char *archivefname = ah->fname;
fa3bfd
+  const char *archivefname = ah->fname;
fa3bfd
   bool defaultfname = false;
fa3bfd
 
fa3bfd
   /* If ah has a non-NULL fname open that otherwise open the default.  */
fa3bfd
@@ -530,8 +530,8 @@ open_archive (struct locarhandle *ah, bool readonly)
fa3bfd
       defaultfname = true;
fa3bfd
       archivefname = fname;
fa3bfd
       if (output_prefix)
fa3bfd
-        memcpy (archivefname, output_prefix, prefix_len);
fa3bfd
-      strcpy (archivefname + prefix_len, ARCHIVE_NAME);
fa3bfd
+        memcpy (fname, output_prefix, prefix_len);
fa3bfd
+      strcpy (fname + prefix_len, ARCHIVE_NAME);
fa3bfd
     }
fa3bfd
 
fa3bfd
   while (1)