From: Bruno Haible Date: Sun, 6 Sep 2020 20:59:49 +0000 (+0200) Subject: msgfmt: Simplify code. X-Git-Tag: v0.22~323 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdeeaf2bab756f2bba6e62f6264e7c8bbb2b42f9;p=thirdparty%2Fgettext.git msgfmt: Simplify code. * gettext-tools/src/msgfmt.c (msgfmt_desktop_bulk): Simplify. --- diff --git a/gettext-tools/src/msgfmt.c b/gettext-tools/src/msgfmt.c index f990152d2..33e0f2ae3 100644 --- a/gettext-tools/src/msgfmt.c +++ b/gettext-tools/src/msgfmt.c @@ -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);