1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-02 07:46:38 +02:00

exec: use util functions to parse integers

This commit is contained in:
Sébastien Helleu
2026-06-20 10:38:16 +02:00
parent 42b91aa91d
commit 08b173f9b7
2 changed files with 4 additions and 9 deletions
+1 -4
View File
@@ -85,15 +85,12 @@ struct t_exec_cmd *
exec_search_by_id (const char *id)
{
struct t_exec_cmd* ptr_exec_cmd;
char *error;
long number;
if (!id)
return NULL;
error = NULL;
number = strtol (id, &error, 10);
if (!error || error[0])
if (!weechat_util_parse_long (id, 10, &number))
number = -1;
for (ptr_exec_cmd = exec_cmds; ptr_exec_cmd;