Mercurial > pidgin
diff libpurple/protocols/zephyr/zephyr.c @ 31906:e8d4755ef84b
Don't use strlen() when you're just checking whether a string is
empty
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Mon, 22 Aug 2011 02:11:36 +0000 |
parents | 323876c34a96 |
children | 99ca503ea087 |
line wrap: on
line diff
--- a/libpurple/protocols/zephyr/zephyr.c Mon Aug 22 02:07:41 2011 +0000 +++ b/libpurple/protocols/zephyr/zephyr.c Mon Aug 22 02:11:36 2011 +0000 @@ -1164,7 +1164,7 @@ locations = find_node(newparsetree,"locations"); locval = tree_child(tree_child(tree_child(tree_child(locations,2),0),0),2)->contents; - if (!locval || !g_ascii_strcasecmp(locval," ") || (strlen(locval) == 0)) { + if (!locval || !g_ascii_strcasecmp(locval," ") || !*locval) { nlocs = 0; } else { nlocs = 1;