From 41bf839792be7c20447251fd679b6132775749db Mon Sep 17 00:00:00 2001 From: Ulrich Sibiller Date: Mon, 3 Aug 2020 17:02:29 +0200 Subject: Keyboard.c: simplify code Based on PVS Studio finding: "V547 Expression 'data' is always true." --- nx-X11/programs/Xserver/hw/nxagent/Keyboard.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c index 00db6ce2a..8f29d66b8 100644 --- a/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c +++ b/nx-X11/programs/Xserver/hw/nxagent/Keyboard.c @@ -1425,11 +1425,9 @@ static void nxagentXkbGetRemoteNames(void) if ((after > 0) || (type != XA_STRING) || (format != 8)) { - if (data) - { - SAFE_XFree(data); - return; - } + /* data non-null - has been checked above */ + SAFE_XFree(data); + return; } char *name = data; -- cgit v1.2.3