1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-06 17:53:13 +02:00

spell: return directly output of string_dyn_free without temporary variable

This commit is contained in:
Sébastien Helleu
2022-12-19 07:07:12 +01:00
parent 5df4126c75
commit 56436e57fd
+2 -5
View File
@@ -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);
}
/*