aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib/X11/XKBExtDev.c
diff options
context:
space:
mode:
authorwalter harms <wharms@bfs.de>2014-06-07 11:54:34 +0200
committerUlrich Sibiller <uli42@gmx.de>2016-10-19 21:40:29 +0200
commitdd6dc2ddfa8b0cb671711acb9d157de29a48c032 (patch)
tree27513fa34bce2e328c997093fb8225ab8b09d74f /nx-X11/lib/X11/XKBExtDev.c
parenta98260726b8f878e72223899e21ad87882389e2d (diff)
downloadnx-libs-dd6dc2ddfa8b0cb671711acb9d157de29a48c032.tar.gz
nx-libs-dd6dc2ddfa8b0cb671711acb9d157de29a48c032.tar.bz2
nx-libs-dd6dc2ddfa8b0cb671711acb9d157de29a48c032.zip
rm redundant null checks
remove more redundant NULL checks note that _XkbFree() is really Xfree() Signed-off-by: Harms <wharms@bfs,de> Reviewed-by: RĂ©mi Cardona <remi@gentoo.org> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Backported-to-NX-by: Ulrich Sibiller <uli42@gmx.de>
Diffstat (limited to 'nx-X11/lib/X11/XKBExtDev.c')
-rw-r--r--nx-X11/lib/X11/XKBExtDev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/nx-X11/lib/X11/XKBExtDev.c b/nx-X11/lib/X11/XKBExtDev.c
index 25c76ab11..183647fc6 100644
--- a/nx-X11/lib/X11/XKBExtDev.c
+++ b/nx-X11/lib/X11/XKBExtDev.c
@@ -194,8 +194,8 @@ _XkbReadGetDeviceInfoReply(Display *dpy,
act = &devi->btn_acts[rep->firstBtnWanted];
bzero((char *) act, (rep->nBtnsWanted * sizeof(XkbAction)));
}
- if (devi->name != NULL)
- _XkbFree(devi->name);
+
+ _XkbFree(devi->name);
if (!_XkbGetReadBufferCountedString(&buf, &devi->name))
goto BAILOUT;
if (rep->nBtnsRtrn > 0) {
@@ -475,7 +475,7 @@ _InitLedStuff(SetLedStuff *stuff, unsigned wanted, XkbDeviceInfoPtr devi)
static void
_FreeLedStuff(SetLedStuff * stuff)
{
- if ((stuff->num_info > 0) && (stuff->info != NULL))
+ if (stuff->num_info > 0)
_XkbFree(stuff->info);
bzero(stuff, sizeof(SetLedStuff));
return;