diff options
author | Ran Benita <ran234@gmail.com> | 2013-12-02 14:23:59 +0200 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2013-12-02 14:26:37 +0200 |
commit | 048ee7031d8598913e778b9d4de6097584e48971 (patch) | |
tree | d8116aedecc3679503f1d575c7922802e5938ba3 /src/atom.c | |
parent | d873693ba609923f7e723af5aeb34ce657375b9a (diff) | |
download | xorg-lib-libxkbcommon-048ee7031d8598913e778b9d4de6097584e48971.tar.gz |
atom: allow passing NULLs to find_node_pointer()
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/atom.c')
-rw-r--r-- | src/atom.c | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -171,8 +171,10 @@ find_node_pointer(struct atom_table *table, const char *string, size_t len, } } - *fingerprint_out = fingerprint; - *nodep_out = nodep; + if (fingerprint_out) + *fingerprint_out = fingerprint; + if (nodep_out) + *nodep_out = nodep; return found; } @@ -180,12 +182,11 @@ xkb_atom_t atom_lookup(struct atom_table *table, const char *string, size_t len) { struct atom_node **nodep; - unsigned int fingerprint; if (!string) return XKB_ATOM_NONE; - if (!find_node_pointer(table, string, len, &nodep, &fingerprint)) + if (!find_node_pointer(table, string, len, &nodep, NULL)) return XKB_ATOM_NONE; return (*nodep)->atom; |