From dba1340ce73b1d676fc7ff6e19f7798236e803e9 Mon Sep 17 00:00:00 2001 From: rbuj Date: Sat, 5 Dec 2020 21:31:24 +0100 Subject: cppcheck warning: The if condition is the same as the previous one --- plugins/spell/pluma-spell-checker.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'plugins/spell/pluma-spell-checker.c') diff --git a/plugins/spell/pluma-spell-checker.c b/plugins/spell/pluma-spell-checker.c index e269faf4..394c3bbf 100644 --- a/plugins/spell/pluma-spell-checker.c +++ b/plugins/spell/pluma-spell-checker.c @@ -247,15 +247,17 @@ lazy_init (PlumaSpellChecker *spell, /* Second try to get a default language */ if (spell->active_lang == NULL) + { spell->active_lang = pluma_spell_checker_language_from_key ("en_US"); - /* Last try to get a default language */ - if (spell->active_lang == NULL) - { - const GSList *langs; - langs = pluma_spell_checker_get_available_languages (); - if (langs != NULL) - spell->active_lang = (const PlumaSpellCheckerLanguage *)langs->data; + /* Last try to get a default language */ + if (spell->active_lang == NULL) + { + const GSList *langs; + langs = pluma_spell_checker_get_available_languages (); + if (langs != NULL) + spell->active_lang = (const PlumaSpellCheckerLanguage *)langs->data; + } } if (spell->active_lang != NULL) -- cgit v1.2.1