about summary refs log tree commit diff
path: root/intl/dcigettext.c
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2005-04-01 15:13:31 +0000
committerJakub Jelinek <jakub@redhat.com>2005-04-01 15:13:31 +0000
commite8eaba2b25948c0e60f70c33c5c52aad70bbf5fc (patch)
tree020566c0ffd2d27131ee7bac45eea5560a4732bd /intl/dcigettext.c
parente3166b6660ce5f0640242a4806a380bb651a2291 (diff)
downloadglibc-e8eaba2b25948c0e60f70c33c5c52aad70bbf5fc.tar.gz
glibc-e8eaba2b25948c0e60f70c33c5c52aad70bbf5fc.tar.xz
glibc-e8eaba2b25948c0e60f70c33c5c52aad70bbf5fc.zip
Updated to fedora-glibc-20050401T1444
Diffstat (limited to 'intl/dcigettext.c')
-rw-r--r--intl/dcigettext.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
index 75762ea18f..8163064edc 100644
--- a/intl/dcigettext.c
+++ b/intl/dcigettext.c
@@ -177,7 +177,7 @@ static void *mempcpy PARAMS ((void *dest, const void *src, size_t n));
 struct known_translation_t
 {
   /* Domain in which to search.  */
-  char *domainname;
+  const char *domainname;
 
   /* The category.  */
   int category;
@@ -436,7 +436,7 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
   search = (struct known_translation_t *)
 	   alloca (offsetof (struct known_translation_t, msgid) + msgid_len);
   memcpy (search->msgid, msgid1, msgid_len);
-  search->domainname = (char *) domainname;
+  search->domainname = domainname;
   search->category = category;
 
   /* Since tfind/tsearch manage a balanced tree, concurrent tfind and
@@ -632,9 +632,11 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
 			    + msgid_len + domainname_len + 1);
 		  if (newp != NULL)
 		    {
-		      newp->domainname =
-			mempcpy (newp->msgid, msgid1, msgid_len);
-		      memcpy (newp->domainname, domainname, domainname_len + 1);
+		      char *new_domainname;
+
+		      new_domainname = mempcpy (newp->msgid, msgid1, msgid_len);
+		      memcpy (new_domainname, domainname, domainname_len + 1);
+		      newp->domainname = new_domainname;
 		      newp->category = category;
 		      newp->counter = _nl_msg_cat_cntr;
 		      newp->domain = domain;