changeset 25748:8789b9202c06

Use strcmp instead of a wrapper
author Paul Aurich <paul@darkrain42.org>
date Fri, 21 Nov 2008 17:47:12 +0000
parents 504c98a90ef5
children b5dbf1d9930b
files libpurple/protocols/jabber/caps.c
diffstat 1 files changed, 5 insertions(+), 13 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/jabber/caps.c	Fri Nov 21 08:28:50 2008 +0000
+++ b/libpurple/protocols/jabber/caps.c	Fri Nov 21 17:47:12 2008 +0000
@@ -54,7 +54,9 @@
 	const JabberCapsKey *name1 = v1;
 	const JabberCapsKey *name2 = v2;
 	
-	return strcmp(name1->node,name2->node) == 0 && strcmp(name1->ver,name2->ver) == 0 && strcmp(name1->hash,name2->hash) == 0;
+	return strcmp(name1->node, name2->node) == 0 &&
+	       strcmp(name1->ver, name2->ver) == 0 &&
+	       strcmp(name1->hash, name2->hash) == 0;
 }
 
 void jabber_caps_destroy_key(gpointer key) {
@@ -636,16 +638,6 @@
 }
 #endif
 
-static gint jabber_caps_string_compare(gconstpointer a, gconstpointer b) {
-	const gchar *ac;
-	const gchar *bc;
-	
-	ac = a;
-	bc = b;
-	
-	return strcmp(ac, bc);
-}
-
 static gchar *jabber_caps_get_formtype(const xmlnode *x) {
 	xmlnode *formtypefield;
 	formtypefield = xmlnode_get_child(x, "field");
@@ -734,7 +726,7 @@
 			gchar *val = xmlnode_get_data(value);
 			xdatafield->values = g_list_append(xdatafield->values, val);
 		}
-		xdatafield->values = g_list_sort(xdatafield->values, jabber_caps_string_compare);
+		xdatafield->values = g_list_sort(xdatafield->values, (GCompareFunc)strcmp);
 		fields = g_list_append(fields, xdatafield);
 	} 
 	fields = g_list_sort(fields, jabber_caps_xdata_field_compare);
@@ -764,7 +756,7 @@
 	
 	/* sort identities, features and x-data forms */
 	info->identities = g_list_sort(info->identities, jabber_caps_jabber_identity_compare);
-	info->features = g_list_sort(info->features, jabber_caps_string_compare);
+	info->features = g_list_sort(info->features, (GCompareFunc)strcmp);
 	info->forms = g_list_sort(info->forms, jabber_caps_jabber_xdata_compare);
 	
 	/* concat identities to the verification string */