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