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

core, plugins: replace "%lx" by "%p" in calls to sscanf

This commit is contained in:
Sébastien Helleu
2024-06-14 17:59:02 +02:00
parent ce79d218a4
commit e64ab3c675
21 changed files with 62 additions and 91 deletions
+2 -7
View File
@@ -41,7 +41,6 @@ fset_mouse_focus_cb (const void *pointer, void *data, struct t_hashtable *info)
{
const char *buffer;
int rc, format_number;
unsigned long value;
struct t_gui_buffer *ptr_buffer;
long y, option_index;
char *error, str_value[128];
@@ -58,12 +57,10 @@ fset_mouse_focus_cb (const void *pointer, void *data, struct t_hashtable *info)
if (!buffer)
return info;
rc = sscanf (buffer, "%lx", &value);
rc = sscanf (buffer, "%p", &ptr_buffer);
if ((rc == EOF) || (rc == 0))
return info;
ptr_buffer = (struct t_gui_buffer *)value;
if (!ptr_buffer || (ptr_buffer != fset_buffer))
return info;
@@ -186,7 +183,6 @@ fset_mouse_hsignal_cb (const void *pointer, void *data, const char *signal,
const char *ptr_key, *ptr_fset_option_pointer;
char str_command[1024];
struct t_fset_option *ptr_fset_option;
unsigned long value;
int rc, distance, num_options, min_y, max_y, i;
int chat_line_x, chat_line_x2, y, y2, chat_line_y, chat_line_y2;
int option_index, option_index2, index1, index2;
@@ -205,10 +201,9 @@ fset_mouse_hsignal_cb (const void *pointer, void *data, const char *signal,
if (!ptr_key || !ptr_fset_option_pointer)
return WEECHAT_RC_OK;
rc = sscanf (ptr_fset_option_pointer, "%lx", &value);
rc = sscanf (ptr_fset_option_pointer, "%p", &ptr_fset_option);
if ((rc == EOF) || (rc == 0))
return WEECHAT_RC_OK;
ptr_fset_option = (struct t_fset_option *)value;
if (!ptr_fset_option)
return WEECHAT_RC_OK;