1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-01 23:36:37 +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
@@ -563,7 +563,7 @@ script_repo_add (struct t_script_repo *script)
/* add script to the end */
script->prev_script = last_script_repo;
script->next_script = NULL;
if (scripts_repo)
if (last_script_repo)
last_script_repo->next_script = script;
else
scripts_repo = script;