[dix/inpututils.c:909] -> [dix/inpututils.c:905]: (warning) Either the condition
'if(list)' is redundant or there is possible null pointer dereference: list.

Signed-off-by: Ilya Shipitsin <chipits...@gmail.com>
---
 dix/inpututils.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/dix/inpututils.c b/dix/inpututils.c
index 6bff9efab..f4c386a24 100644
--- a/dix/inpututils.c
+++ b/dix/inpututils.c
@@ -902,7 +902,9 @@ input_option_new(InputOption *list, const char *key, const 
char *value)
     if (!opt)
         return NULL;
 
-    nt_list_init(opt, list.next);
+    if (list)
+        nt_list_init(opt, list.next);
+
     input_option_set_key(opt, key);
     input_option_set_value(opt, value);
 
-- 
2.14.3

_______________________________________________
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to