aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/programs
diff options
context:
space:
mode:
authorUlrich Sibiller <uli42@gmx.de>2020-08-03 17:02:29 +0200
committerUlrich Sibiller <uli42@gmx.de>2021-01-15 19:50:35 +0100
commit41bf839792be7c20447251fd679b6132775749db (patch)
treeabf0e1b3a59515c6e872dad4025848a4981223b2 /nx-X11/programs
parent5735e164e9625137c7d3209428eafab33300df94 (diff)
downloadnx-libs-41bf839792be7c20447251fd679b6132775749db.tar.gz
nx-libs-41bf839792be7c20447251fd679b6132775749db.tar.bz2
nx-libs-41bf839792be7c20447251fd679b6132775749db.zip
Keyboard.c: simplify code
Based on PVS Studio finding: "V547 Expression 'data' is always true."
Diffstat (limited to 'nx-X11/programs')
-rw-r--r--nx-X11/programs/Xserver/hw/nxagent/Keyboard.c8
1 files 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;