Fix build warning in locarchive.c
This commit is contained in:
parent
0417b20fe6
commit
4712799fbb
|
@ -1,5 +1,9 @@
|
||||||
2013-11-20 Siddhesh Poyarekar <siddhesh@redhat.com>
|
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]
|
[BZ #15601]
|
||||||
* libio/tst-widetext.input: Rename Oriya to Odia.
|
* libio/tst-widetext.input: Rename Oriya to Odia.
|
||||||
* locale/iso-639.def: Likewise.
|
* locale/iso-639.def: Likewise.
|
||||||
|
|
|
@ -564,15 +564,15 @@ open_archive (struct locarhandle *ah, bool readonly)
|
||||||
int retry = 0;
|
int retry = 0;
|
||||||
size_t prefix_len = output_prefix ? strlen (output_prefix) : 0;
|
size_t prefix_len = output_prefix ? strlen (output_prefix) : 0;
|
||||||
char default_fname[prefix_len + sizeof (ARCHIVE_NAME)];
|
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 ah has a non-NULL fname open that otherwise open the default. */
|
||||||
if (archivefname == NULL)
|
if (archivefname == NULL)
|
||||||
{
|
{
|
||||||
archivefname = default_fname;
|
archivefname = default_fname;
|
||||||
if (output_prefix)
|
if (output_prefix)
|
||||||
memcpy (archivefname, output_prefix, prefix_len);
|
memcpy (default_fname, output_prefix, prefix_len);
|
||||||
strcpy (archivefname + prefix_len, ARCHIVE_NAME);
|
strcpy (default_fname + prefix_len, ARCHIVE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
|
|
Loading…
Reference in New Issue