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

core, plugins: fix conditions to insert elements in linked lists

This removes scan-build warnings about dereference of last_xxx null pointers.
This commit is contained in:
Sébastien Helleu
2017-06-10 16:21:11 +02:00
parent 8c8a0c0826
commit 54bf589d7d
25 changed files with 47 additions and 47 deletions
+1 -1
View File
@@ -136,7 +136,7 @@ exec_add ()
new_exec_cmd->prev_cmd = last_exec_cmd;
new_exec_cmd->next_cmd = NULL;
if (exec_cmds)
if (last_exec_cmd)
last_exec_cmd->next_cmd = new_exec_cmd;
else
exec_cmds = new_exec_cmd;