From d00594ebc7941a5491ad5583d6890ab7dc2ffc43 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 1 Nov 2020 13:38:21 -0800 Subject: [PATCH] AddInputDevice: only need to check once if we failed to calloc dev Resolves warning from Oracle Parfait static analyser: Warning: Impossible or redundant condition Impossible or redundant condition [impossible-redundant-condition]: Condition 'dev != NULL' of branch is determined by previous branch at line 270 of dix/devices.c in function 'AddInputDevice'. Condition 'dev != NULL' from this branch implies following branch is always true at line 262 Fixes: commit 493ad83323 Signed-off-by: Alan Coopersmith --- dix/devices.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/dix/devices.c b/dix/devices.c index 7bf5ac072..59a4dbfee 100644 --- a/dix/devices.c +++ b/dix/devices.c @@ -267,9 +267,6 @@ AddInputDevice(ClientPtr client, DeviceProc deviceProc, Bool autoStart) return NULL; } - if (!dev) - return (DeviceIntPtr) NULL; - dev->last.scroll = NULL; dev->last.touches = NULL; dev->id = devid;