summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2009-02-05 19:59:54 +0000
committerUlrich Drepper <drepper@redhat.com>2009-02-05 19:59:54 +0000
commit52de761a93b7306f6efb002e90b89cba1fd8c5f2 (patch)
tree7b36521989b977f8a56520156a7e2ca4d410b971
parent62f63c47ee9d6dcac1f47870e8038f1b1889e0d4 (diff)
downloadglibc-52de761a93b7306f6efb002e90b89cba1fd8c5f2.tar.gz
glibc-52de761a93b7306f6efb002e90b89cba1fd8c5f2.tar.xz
glibc-52de761a93b7306f6efb002e90b89cba1fd8c5f2.zip
* intl/dcigettext.c (DCIGETTEXT): Avoid some code duplication.
-rw-r--r--ChangeLog2
-rw-r--r--intl/dcigettext.c15
2 files changed, 4 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 7b6d4dc718..caafea3155 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2009-02-05  Ulrich Drepper  <drepper@redhat.com>
 
+	* intl/dcigettext.c (DCIGETTEXT): Avoid some code duplication.
+
 	* sysdeps/unix/opendir.c (__alloc_dir): We have a lot more memory
 	today than when the original code was written.  Use larger
 	buffers.  This also makes it unnecessary to have stat information,
diff --git a/intl/dcigettext.c b/intl/dcigettext.c
index e0782446e4..16d901e7d0 100644
--- a/intl/dcigettext.c
+++ b/intl/dcigettext.c
@@ -1,5 +1,5 @@
 /* Implementation of the internal dcigettext function.
-   Copyright (C) 1995-2005, 2006, 2007, 2008
+   Copyright (C) 1995-2005, 2006, 2007, 2008, 2009
    Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
@@ -553,18 +553,7 @@ DCIGETTEXT (domainname, msgid1, msgid2, plural, n, category)
 	}
 
       if (ret == NULL)
-	{
-	  /* We cannot get the current working directory.  Don't signal an
-	     error but simply return the default string.  */
-	  FREE_BLOCKS (block_list);
-	  __libc_rwlock_unlock (__libc_setlocale_lock);
-	  __libc_rwlock_unlock (_nl_state_lock);
-	  __set_errno (saved_errno);
-	  return (plural == 0
-		  ? (char *) msgid1
-		  /* Use the Germanic plural rule.  */
-		  : n == 1 ? (char *) msgid1 : (char *) msgid2);
-	}
+	goto no_translation;
 
       stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
     }