From dd6dc2ddfa8b0cb671711acb9d157de29a48c032 Mon Sep 17 00:00:00 2001 From: walter harms Date: Sat, 7 Jun 2014 11:54:34 +0200 Subject: rm redundant null checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit remove more redundant NULL checks note that _XkbFree() is really Xfree() Signed-off-by: Harms Reviewed-by: RĂ©mi Cardona Signed-off-by: Peter Hutterer Backported-to-NX-by: Ulrich Sibiller --- nx-X11/lib/X11/XKBExtDev.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'nx-X11/lib/X11/XKBExtDev.c') 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; -- cgit v1.2.3