diff options
author | walter harms <wharms@bfs.de> | 2014-06-07 11:54:34 +0200 |
---|---|---|
committer | Ulrich Sibiller <uli42@gmx.de> | 2016-10-19 21:40:29 +0200 |
commit | dd6dc2ddfa8b0cb671711acb9d157de29a48c032 (patch) | |
tree | 27513fa34bce2e328c997093fb8225ab8b09d74f /nx-X11/lib/X11/XKBGeom.c | |
parent | a98260726b8f878e72223899e21ad87882389e2d (diff) | |
download | nx-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/XKBGeom.c')
-rw-r--r-- | nx-X11/lib/X11/XKBGeom.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/nx-X11/lib/X11/XKBGeom.c b/nx-X11/lib/X11/XKBGeom.c index 0145da8c1..f57fe7cf6 100644 --- a/nx-X11/lib/X11/XKBGeom.c +++ b/nx-X11/lib/X11/XKBGeom.c @@ -269,10 +269,9 @@ _XkbReadGeomProperties(XkbReadBufferPtr buf, ok = _XkbGetReadBufferCountedString(buf, &name) && ok; ok = _XkbGetReadBufferCountedString(buf, &value) && ok; ok = ok && (XkbAddGeomProperty(geom, name, value) != NULL); - if (name) - _XkbFree(name); - if (value) - _XkbFree(value); + + _XkbFree(name); + _XkbFree(value); } if (ok) rtrn = Success; @@ -322,8 +321,8 @@ _XkbReadGeomColors(XkbReadBufferPtr buf, rtrn = BadLength; else if (XkbAddGeomColor(geom, spec, geom->num_colors) == NULL) rtrn = BadAlloc; - if (spec) - _XkbFree(spec); + + _XkbFree(spec); if (rtrn != Success) return rtrn; } |