]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
msgfmt: Simplify code.
authorBruno Haible <bruno@clisp.org>
Sun, 6 Sep 2020 20:59:49 +0000 (22:59 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 6 Sep 2020 21:27:23 +0000 (23:27 +0200)
* gettext-tools/src/msgfmt.c (msgfmt_desktop_bulk): Simplify.

gettext-tools/src/msgfmt.c

index f990152d262d7b19491c297a9e47567b19146635..33e0f2ae399da4051b1de71fd7da20666dd9ba60 100644 (file)
@@ -1639,16 +1639,13 @@ msgfmt_desktop_bulk (const char *directory,
   /* Read all .po files.  */
   nerrors = msgfmt_operand_list_add_from_directory (&operands, directory);
   if (nerrors > 0)
-    {
-      msgfmt_operand_list_destroy (&operands);
-      return 1;
-    }
-
-  /* Write the messages into .desktop file.  */
-  status = msgdomain_write_desktop_bulk (&operands,
-                                         template_file_name,
-                                         keywords,
-                                         file_name);
+    status = 1;
+  else
+    /* Write the messages into .desktop file.  */
+    status = msgdomain_write_desktop_bulk (&operands,
+                                           template_file_name,
+                                           keywords,
+                                           file_name);
 
   msgfmt_operand_list_destroy (&operands);