summaryrefslogtreecommitdiff
path: root/plugins/SpellChecker/src/hunspell/suggestmgr.cxx
diff options
context:
space:
mode:
authorRozhuk Ivan <rozhuk.im@gmail.com>2014-11-26 23:48:18 +0000
committerRozhuk Ivan <rozhuk.im@gmail.com>2014-11-26 23:48:18 +0000
commitf19ed36b66a807420c771a467a954114f027384c (patch)
tree1c61894875576ee9cae4b37d448a6a671585fa9d /plugins/SpellChecker/src/hunspell/suggestmgr.cxx
parent08e744c5f087a8e693d160c527097a9f6a5bf712 (diff)
SpellChecker: code cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@11110 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SpellChecker/src/hunspell/suggestmgr.cxx')
-rw-r--r--plugins/SpellChecker/src/hunspell/suggestmgr.cxx5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/SpellChecker/src/hunspell/suggestmgr.cxx b/plugins/SpellChecker/src/hunspell/suggestmgr.cxx
index d89630849c..843075e62f 100644
--- a/plugins/SpellChecker/src/hunspell/suggestmgr.cxx
+++ b/plugins/SpellChecker/src/hunspell/suggestmgr.cxx
@@ -1578,7 +1578,8 @@ char * SuggestMgr::suggest_morph_for_spelling_error(const char * word)
{
char * p = NULL;
char ** wlst = (char **) calloc(maxSug, sizeof(char *));
- if (!**wlst) return NULL;
+ if (!wlst)
+ return NULL;
// we will use only the first suggestion
for (int i = 0; i < maxSug - 1; i++) wlst[i] = "";
int ns = suggest(&wlst, word, maxSug - 1, NULL);
@@ -1586,7 +1587,7 @@ char * SuggestMgr::suggest_morph_for_spelling_error(const char * word)
p = suggest_morph(wlst[maxSug - 1]);
free(wlst[maxSug - 1]);
}
- if (wlst) free(wlst);
+ free(wlst);
return p;
}
#endif // END OF HUNSPELL_EXPERIMENTAL CODE