diff options
author | Sébastien Helleu <flashcode@flashtux.org> | 2019-07-13 22:16:25 +0200 |
---|---|---|
committer | Sébastien Helleu <flashcode@flashtux.org> | 2019-07-13 22:16:25 +0200 |
commit | 5eeb98e40c10eb958486ff11f49800a31cf5c02c (patch) | |
tree | db95029daaeda5e8e2759f3de5c32d1f8defdbb5 /src/plugins/buflist/buflist-info.c | |
parent | f6bc6fec2e2a5640042c36d7d650ccca429f9e74 (diff) | |
download | weechat-5eeb98e40c10eb958486ff11f49800a31cf5c02c.zip |
buflist: use existing variable buflist_hdata_buffer to check buffer pointers in infolist "buflist"
Diffstat (limited to 'src/plugins/buflist/buflist-info.c')
-rw-r--r-- | src/plugins/buflist/buflist-info.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/plugins/buflist/buflist-info.c b/src/plugins/buflist/buflist-info.c index 2d189066b..e69bd32a1 100644 --- a/src/plugins/buflist/buflist-info.c +++ b/src/plugins/buflist/buflist-info.c @@ -63,7 +63,6 @@ buflist_info_infolist_buflist_cb (const void *pointer, void *data, int item_index, i, size; struct t_infolist *ptr_infolist; struct t_gui_buffer *ptr_buffer; - struct t_hdata *hdata_buffer; void *gui_buffers; /* make C compiler happy */ @@ -88,8 +87,7 @@ buflist_info_infolist_buflist_cb (const void *pointer, void *data, if (!ptr_infolist) return NULL; - hdata_buffer = weechat_hdata_get ("buffer"); - gui_buffers = weechat_hdata_get_list (hdata_buffer, "gui_buffers"); + gui_buffers = weechat_hdata_get_list (buflist_hdata_buffer, "gui_buffers"); /* build list with all buffers in buflist */ size = weechat_arraylist_size (buflist_list_buffers[item_index]); @@ -98,7 +96,8 @@ buflist_info_infolist_buflist_cb (const void *pointer, void *data, ptr_buffer = weechat_arraylist_get (buflist_list_buffers[item_index], i); /* check if ptr_buffer is still valid (buffer not closed) */ - if (weechat_hdata_check_pointer (hdata_buffer, gui_buffers, ptr_buffer)) + if (weechat_hdata_check_pointer (buflist_hdata_buffer, + gui_buffers, ptr_buffer)) { if (!buflist_buffer_add_to_infolist (ptr_infolist, ptr_buffer)) { |