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 <alan.coopersmith@oracle.com>
This commit is contained in:
parent
250db8708a
commit
d00594ebc7
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue