libpurple/protocols/jabber/useravatar.c

branch
string-comparison-r2
changeset 38258
9a6551eba09c
parent 33766
49eb0136f2ec
child 38260
dcada91c0912
--- a/libpurple/protocols/jabber/useravatar.c	Thu Mar 23 19:37:57 2017 +0300
+++ b/libpurple/protocols/jabber/useravatar.c	Thu Mar 23 21:01:15 2017 +0300
@@ -352,17 +352,17 @@
 		for(info = metadata->child; info; info = info->next) {
 			if(info->type == XMLNODE_TYPE_TAG)
 				has_children = TRUE;
-			if(info->type == XMLNODE_TYPE_TAG && !strcmp(info->name,"info")) {
+			if(info->type == XMLNODE_TYPE_TAG && purple_strequal(info->name,"info")) {
 				const char *type = xmlnode_get_attrib(info,"type");
 				const char *id = xmlnode_get_attrib(info,"id");
 
-				if(checksum && id && !strcmp(id, checksum)) {
+				if(checksum && id && purple_strequal(id, checksum)) {
 					/* we already have that avatar, so we don't have to do anything */
 					goodinfo = NULL;
 					break;
 				}
 				/* We'll only pick the png one for now. It's a very nice image format anyways. */
-				if(type && id && !goodinfo && !strcmp(type, "image/png"))
+				if(type && id && !goodinfo && purple_strequal(type, "image/png"))
 					goodinfo = info;
 			}
 		}

mercurial