diff options
author | Ran Benita <ran234@gmail.com> | 2012-07-24 19:54:14 +0300 |
---|---|---|
committer | Ran Benita <ran234@gmail.com> | 2012-07-27 00:27:24 +0300 |
commit | 89723b7cb7198d76990110bd3c4efae0dba97765 (patch) | |
tree | d22f80f268455be596bd52771044bb6f742560fb /src/atom.c | |
parent | 4f843c817b213e4b69ee5f3df071ebe3c917088e (diff) | |
download | xorg-lib-libxkbcommon-89723b7cb7198d76990110bd3c4efae0dba97765.tar.gz |
utils: add/replace string equality macros
It's more tidy and less error prone, since we use strcasecmp == 0 a lot.
We replace strcmp == 0 by streq, strcasecmp == 0 by istreq,
uStrCasePrefix by istreq_prefix and uDupString by strdup_safe.
Signed-off-by: Ran Benita <ran234@gmail.com>
Diffstat (limited to 'src/atom.c')
-rw-r--r-- | src/atom.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -136,8 +136,7 @@ atom_text(struct atom_table *table, xkb_atom_t atom) char * atom_strdup(struct atom_table *table, xkb_atom_t atom) { - const char *ret = atom_text(table, atom); - return ret ? strdup(ret) : NULL; + return strdup_safe(atom_text(table, atom)); } /* |