1
0
mirror of https://github.com/weechat/weechat.git synced 2026-06-29 22:36:38 +02:00

core: optimize xxx_valid() functions: return immediately if pointer is NULL

This commit is contained in:
Sebastien Helleu
2014-01-09 19:28:51 +01:00
parent 73eb2564f3
commit 02868b4dc0
5 changed files with 9 additions and 3 deletions
+1 -1
View File
@@ -256,7 +256,7 @@ plugin_script_valid (struct t_plugin_script *scripts,
{
struct t_plugin_script *ptr_script;
if (!script)
if (!scripts || !script)
return 0;
for (ptr_script = scripts; ptr_script;