[PATCH:libxkbfile] Remove unnecessary check.

Thomas Klausner wiz at NetBSD.org
Wed Nov 26 05:33:38 PST 2014


From: Jörg Sonnenberger <joerg at NetBSD.org>

The vmods member of XkbNamesPtr is an array and thus never NULL.

Signed-off-by: Thomas Klausner <wiz at NetBSD.org>
---
 src/cout.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/cout.c b/src/cout.c
index aa1b22d..9e09fd9 100644
--- a/src/cout.c
+++ b/src/cout.c
@@ -45,7 +45,7 @@ WriteCHdrVMods(FILE *file, Display *dpy, XkbDescPtr xkb)
 {
     register int i, nOut;
 
-    if ((!xkb) || (!xkb->names) || (!xkb->names->vmods))
+    if ((!xkb) || (!xkb->names))
         return False;
     for (i = nOut = 0; i < XkbNumVirtualMods; i++) {
         if (xkb->names->vmods[i] != None) {
-- 
2.1.3



More information about the xorg-devel mailing list