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

core, api: use "const char *" variables for result of string functions with const parameter

This commit is contained in:
Sébastien Helleu
2026-06-15 07:44:01 +02:00
parent cf702d541f
commit 7e3afaf46d
16 changed files with 61 additions and 41 deletions
+8 -3
View File
@@ -242,8 +242,8 @@ int
input_data (struct t_gui_buffer *buffer, const char *data,
const char *commands_allowed, int split_newline, int user_data)
{
char *pos, str_buffer[128], *new_data, *buffer_full_name;
const char *ptr_data, *ptr_data_for_buffer;
const char *ptr_data_for_buffer;
char *pos, str_buffer[128], *new_data, *buffer_full_name, *ptr_data;
int first_command, rc;
if (!buffer || !gui_buffer_valid (buffer) || !data)
@@ -272,8 +272,13 @@ input_data (struct t_gui_buffer *buffer, const char *data,
if (data[0] && new_data && !new_data[0])
goto end;
if (!new_data)
new_data = strdup (data);
if (!new_data)
goto end;
first_command = 1;
ptr_data = (new_data) ? new_data : data;
ptr_data = new_data;
while (ptr_data)
{
/*