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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user