From 9e220a7bda52d52c8a30c778cf29266b0c4a567b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Helleu?= Date: Sat, 16 Aug 2014 09:02:31 +0200 Subject: [PATCH] aspell: remove unneeded else condition (cherry picked from commit 3f3eb55c6d3a68e3bf35d77dbe87ed4b0671c582) --- src/plugins/aspell/weechat-aspell-command.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/plugins/aspell/weechat-aspell-command.c b/src/plugins/aspell/weechat-aspell-command.c index 41d9e461e..28a50589e 100644 --- a/src/plugins/aspell/weechat-aspell-command.c +++ b/src/plugins/aspell/weechat-aspell-command.c @@ -441,14 +441,18 @@ weechat_aspell_command_cb (void *data, struct t_gui_buffer *buffer, /* add word to personal dictionary */ if (weechat_strcasecmp (argv[1], "addword") == 0) { - if (argc <= 2) + if (argc < 3) return WEECHAT_RC_ERROR; if (argc > 3) + { /* use a given dict */ weechat_aspell_command_add_word (buffer, argv[2], argv_eol[3]); - else if (argc > 2) + } + else + { /* use default dict */ weechat_aspell_command_add_word (buffer, NULL, argv_eol[2]); + } return WEECHAT_RC_OK; }