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