diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2022-12-19 07:07:12 +0100 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2022-12-19 07:07:12 +0100 |
commit | 56436e57fd29eb81b3e890e5142904958795f14c (patch) | |
tree | 17d0f19c1c53968937a02fba125bae0d738504ec /src/plugins | |
parent | 5df4126c75e2b9ca61b086f6e0a996c85fd77c29 (diff) | |
download | weechat-56436e57fd29eb81b3e890e5142904958795f14c.zip |
spell: return directly output of string_dyn_free without temporary variable
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/spell/spell.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/plugins/spell/spell.c b/src/plugins/spell/spell.c index 84e41ccca..115f98cfe 100644 --- a/src/plugins/spell/spell.c +++ b/src/plugins/spell/spell.c @@ -725,7 +725,7 @@ spell_modifier_cb (const void *pointer, void *data, unsigned long value; struct t_gui_buffer *buffer; struct t_spell_speller_buffer *ptr_speller_buffer; - char **result, *str_result, *ptr_string, *ptr_string_orig, *pos_space; + char **result, *ptr_string, *ptr_string_orig, *pos_space; char *ptr_end, *ptr_end_valid, save_end; char *misspelled_word, *old_misspelled_word, *old_suggestions, *suggestions; char *word_and_suggestions; @@ -1052,10 +1052,7 @@ spell_modifier_cb (const void *pointer, void *data, ptr_speller_buffer->modifier_result = strdup (*result); - str_result = *result; - weechat_string_dyn_free (result, 0); - - return str_result; + return weechat_string_dyn_free (result, 0); } /* |