Commit d873693ba609923f7e723af5aeb34ce657375b9a

Ran Benita 2013-12-02T14:15:58

atom: allow interning empty string Which is different than XKB_ATOM_NONE, as in "" != NULL. Signed-off-by: Ran Benita <ran234@gmail.com>

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/atom.c b/src/atom.c
index dc6e794..422f93e 100644
--- a/src/atom.c
+++ b/src/atom.c
@@ -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)) {