libpurple/protocols/jabber/google/google_roster.c

branch
string-comparison-r2
changeset 38258
9a6551eba09c
parent 36009
4db2936dd842
child 38358
30ba44276e74
--- a/libpurple/protocols/jabber/google/google_roster.c	Thu Mar 23 19:37:57 2017 +0300
+++ b/libpurple/protocols/jabber/google/google_roster.c	Thu Mar 23 21:01:15 2017 +0300
@@ -34,7 +34,7 @@
 	char *jid_norm = (char *)jabber_normalize(account, jid);
 
 	while (list) {
-		if (!strcmp(jid_norm, (char*)list->data)) {
+		if (purple_strequal(jid_norm, (char*)list->data)) {
 			xmlnode_set_attrib(query, "xmlns:gr", NS_GOOGLE_ROSTER);
 			xmlnode_set_attrib(query, "gr:ext", "2");
 			xmlnode_set_attrib(item, "gr:t", "B");
@@ -56,7 +56,7 @@
 	const char *subscription = xmlnode_get_attrib(item, "subscription");
 	const char *ask = xmlnode_get_attrib(item, "ask");
 
-	if ((!subscription || !strcmp(subscription, "none")) && !ask) {
+	if ((!subscription || purple_strequal(subscription, "none")) && !ask) {
 		/* The Google Talk servers will automatically add people from your Gmail address book
 		 * with subscription=none. If we see someone with subscription=none, ignore them.
 		 */

mercurial