mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 08:13:14 +02:00
core: fix print of pointer values
This commit is contained in:
@@ -176,7 +176,6 @@ test_modifier_cb (const void *pointer, void *data,
|
||||
char **items, *new_string;
|
||||
const char *ptr_plugin, *ptr_tags, *ptr_msg;
|
||||
int num_items, length, rc;
|
||||
unsigned long value;
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
|
||||
/* make C++ compiler happy */
|
||||
@@ -197,10 +196,9 @@ test_modifier_cb (const void *pointer, void *data,
|
||||
|
||||
ptr_tags = (num_items >= 2) ? items[1] : NULL;
|
||||
|
||||
rc = sscanf (items[0], "0x%lx", &value);
|
||||
rc = sscanf (items[0], "%p", &ptr_buffer);
|
||||
if ((rc == EOF) || (rc == 0))
|
||||
goto error;
|
||||
ptr_buffer = (struct t_gui_buffer *)value;
|
||||
|
||||
ptr_plugin = gui_buffer_get_plugin_name (ptr_buffer);
|
||||
if (!ptr_plugin)
|
||||
|
||||
Reference in New Issue
Block a user