summaryrefslogtreecommitdiff
path: root/locale
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2006-05-11 14:01:43 +0000
committerJakub Jelinek <jakub@redhat.com>2006-05-11 14:01:43 +0000
commit3ec0d26c76d6905501034692d05bddbabae64e76 (patch)
tree191efcdfd934a0369cdef723fe4f650fe2f3dcfc /locale
parent262cf6b3df91d5bb7cbdcae2390333b21e8008d5 (diff)
Updated to fedora-glibc-20060511T1325cvs/fedora-glibc-2_4_90-7
Diffstat (limited to 'locale')
-rw-r--r--locale/programs/ld-time.c13
-rw-r--r--locale/programs/locfile.c11
2 files changed, 15 insertions, 9 deletions
diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c
index 2d63275d3c..78aff7fee6 100644
--- a/locale/programs/ld-time.c
+++ b/locale/programs/ld-time.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1995-2002, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1995-2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1995.
@@ -468,9 +468,14 @@ No definition for %s category found"), "LC_TIME"));
wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end start */
wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end end */
time->era_entries[idx].wname = (uint32_t *) wstr + 1;
- wstr = wstr ? wcschr (wstr + 1, L':') : NULL; /* end name */
- *wstr = L'\0';
- time->era_entries[idx].wformat = (uint32_t *) wstr + 1;
+ if (wstr != NULL)
+ {
+ wstr = wcschr (wstr + 1, L':'); /* end name */
+ *wstr = L'\0';
+ time->era_entries[idx].wformat = (uint32_t *) wstr + 1;
+ }
+ else
+ time->era_entries[idx].wformat = NULL;
}
}
diff --git a/locale/programs/locfile.c b/locale/programs/locfile.c
index bc12fbb332..ae8ce73ce4 100644
--- a/locale/programs/locfile.c
+++ b/locale/programs/locfile.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996-2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
@@ -155,10 +155,11 @@ argument to `%s' must be a single character"),
if (repertoire_name == NULL)
{
- repertoire_name = memcpy (xmalloc (arg->val.str.lenmb + 1),
- arg->val.str.startmb,
- arg->val.str.lenmb);
- ((char *) repertoire_name)[arg->val.str.lenmb] = '\0';
+ char *newp = alloca (arg->val.str.lenmb + 1);
+
+ *((char *) mempcpy (newp, arg->val.str.startmb,
+ arg->val.str.lenmb)) = '\0';
+ repertoire_name = newp;
}
break;