atom: allow interning empty string
authorRan Benita <ran234@gmail.com>
Mon, 2 Dec 2013 12:15:58 +0000 (14:15 +0200)
committerRan Benita <ran234@gmail.com>
Mon, 2 Dec 2013 12:15:58 +0000 (14:15 +0200)
Which is different than XKB_ATOM_NONE, as in "" != NULL.

Signed-off-by: Ran Benita <ran234@gmail.com>
src/atom.c

index dc6e794..422f93e 100644 (file)
@@ -204,7 +204,7 @@ atom_intern(struct atom_table *table, const char *string, size_t len,
     struct atom_node *node;
     unsigned int fingerprint;
 
-    if (!string || len == 0)
+    if (!string)
         return XKB_ATOM_NONE;
 
     if (find_node_pointer(table, string, len, &nodep, &fingerprint)) {