diff options
author | Siddhesh Poyarekar <siddhesh@redhat.com> | 2013-11-20 18:19:57 +0530 |
---|---|---|
committer | Siddhesh Poyarekar <siddhesh@redhat.com> | 2013-11-20 18:19:57 +0530 |
commit | 4712799fbb6812cc73f7bd9c8faa6e7b05c0f5ab (patch) | |
tree | 732e9392529a30549ae78adfd9eeb8b36f129f1b | |
parent | 0417b20fe6c671b3a8761a5f8ad59f14d774fa83 (diff) | |
download | glibc-4712799fbb6812cc73f7bd9c8faa6e7b05c0f5ab.tar.gz glibc-4712799fbb6812cc73f7bd9c8faa6e7b05c0f5ab.tar.xz glibc-4712799fbb6812cc73f7bd9c8faa6e7b05c0f5ab.zip |
Fix build warning in locarchive.c
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | locale/programs/locarchive.c | 6 |
2 files changed, 7 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog index d5a5bafeb2..c0e48df46d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2013-11-20 Siddhesh Poyarekar <siddhesh@redhat.com> + * locale/programs/locarchive.c (open_archive): Add const + qualifier to ARCHIVEFNAME and copy default fname to + DEFAULT_FNAME. + [BZ #15601] * libio/tst-widetext.input: Rename Oriya to Odia. * locale/iso-639.def: Likewise. diff --git a/locale/programs/locarchive.c b/locale/programs/locarchive.c index e796865a75..88e1172219 100644 --- a/locale/programs/locarchive.c +++ b/locale/programs/locarchive.c @@ -564,15 +564,15 @@ open_archive (struct locarhandle *ah, bool readonly) int retry = 0; size_t prefix_len = output_prefix ? strlen (output_prefix) : 0; char default_fname[prefix_len + sizeof (ARCHIVE_NAME)]; - char *archivefname = ah->fname; + const char *archivefname = ah->fname; /* If ah has a non-NULL fname open that otherwise open the default. */ if (archivefname == NULL) { archivefname = default_fname; if (output_prefix) - memcpy (archivefname, output_prefix, prefix_len); - strcpy (archivefname + prefix_len, ARCHIVE_NAME); + memcpy (default_fname, output_prefix, prefix_len); + strcpy (default_fname + prefix_len, ARCHIVE_NAME); } while (1) |