comparison libpurple/protocols/zephyr/zephyr.c @ 32365: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
comparison
equal deleted inserted replaced
32364:323876c34a96 32365:e8d4755ef84b
1162 g_free(stripped_user); 1162 g_free(stripped_user);
1163 } 1163 }
1164 locations = find_node(newparsetree,"locations"); 1164 locations = find_node(newparsetree,"locations");
1165 locval = tree_child(tree_child(tree_child(tree_child(locations,2),0),0),2)->contents; 1165 locval = tree_child(tree_child(tree_child(tree_child(locations,2),0),0),2)->contents;
1166 1166
1167 if (!locval || !g_ascii_strcasecmp(locval," ") || (strlen(locval) == 0)) { 1167 if (!locval || !g_ascii_strcasecmp(locval," ") || !*locval) {
1168 nlocs = 0; 1168 nlocs = 0;
1169 } else { 1169 } else {
1170 nlocs = 1; 1170 nlocs = 1;
1171 } 1171 }
1172 1172