]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Simplify code.
authorBruno Haible <bruno@clisp.org>
Thu, 20 Oct 2005 17:47:15 +0000 (17:47 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:12:55 +0000 (12:12 +0200)
gettext-runtime/intl/ChangeLog
gettext-runtime/intl/explodename.c

index 99a799833956d5ac196c0b9d47584abaadc13a77..c712708d1a9e085a0fefbaceb0a724feeddbe461 100644 (file)
@@ -1,3 +1,8 @@
+2005-10-09  Bruno Haible  <bruno@clisp.org>
+2002-07-24  Ulrich Drepper  <drepper@redhat.com>
+
+       * explodename.c (_nl_explode_name): Simplify.
+
 2005-10-09  Bruno Haible  <bruno@clisp.org>
 2002-07-24  Ulrich Drepper  <drepper@redhat.com>
 
index 04f82bd44d19c6b4912357874cefd9b02c42b6af..8d3e1463d15f974566356fcb8620c5438f8a0690 100644 (file)
@@ -119,7 +119,8 @@ _nl_explode_name (char *name,
       cp[0] = '\0';
       *modifier = ++cp;
 
-      mask |= XPG_MODIFIER;
+      if (cp[0] != '\0')
+       mask |= XPG_MODIFIER;
     }
 
   if (*territory != NULL && (*territory)[0] == '\0')
@@ -128,8 +129,5 @@ _nl_explode_name (char *name,
   if (*codeset != NULL && (*codeset)[0] == '\0')
     mask &= ~XPG_CODESET;
 
-  if (*modifier != NULL && (*modifier)[0] == '\0')
-    mask &= ~XPG_MODIFIER;
-
   return mask;
 }