about summary refs log tree commit diff
path: root/intl/dcgettext.c
diff options
context:
space:
mode:
Diffstat (limited to 'intl/dcgettext.c')
-rw-r--r--intl/dcgettext.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/intl/dcgettext.c b/intl/dcgettext.c
index 91025be89b..09e0443494 100644
--- a/intl/dcgettext.c
+++ b/intl/dcgettext.c
@@ -317,14 +317,13 @@ DCGETTEXT (domainname, msgid, category)
 	    {
 	      int cnt;
 
-	      for (cnt = 6; cnt >= 0 && retval == NULL; --cnt)
-		if (domain->successor[cnt] != NULL)
-		  {
-		    retval = find_msg (domain->successor[cnt], msgid);
-
- 		    if (domain->successor[cnt]->data == NULL)
-		      domain->successor[cnt] = NULL;
-		  }
+	      for (cnt = 0; domain->successor[cnt] != NULL; --cnt)
+		{
+		  retval = find_msg (domain->successor[cnt], msgid);
+
+		  if (retval != NULL)
+		    break;
+		}
 	    }
 
 	  if (retval != NULL)