pidgin: 3d50a7d0: g_strncasecmp is deprecated. I thought I...

qulogic at pidgin.im qulogic at pidgin.im
Tue Aug 18 00:40:22 EDT 2009


-----------------------------------------------------------------
Revision: 3d50a7d038631a61998bb6cd271ef5ca1ce06417
Ancestor: 013c48c5d12f961fedc61bd7857a3741cff2083d
Author: qulogic at pidgin.im
Date: 2009-08-18T04:34:30
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/3d50a7d038631a61998bb6cd271ef5ca1ce06417

Modified files:
        libpurple/protocols/yahoo/libymsg.c libpurple/util.c

ChangeLog: 

g_strncasecmp is deprecated. I thought I removed these already. Anyway, I
think these should be good as ASCII.

-------------- next part --------------
============================================================
--- libpurple/protocols/yahoo/libymsg.c	26a3613aa90c28544d1984d530d29412c6a1e09c
+++ libpurple/protocols/yahoo/libymsg.c	b47aebcb209b33137a085b87f0b77d0108e61151
@@ -4271,7 +4271,7 @@ int yahoo_send_im(PurpleConnection *gc, 
 		}
 	}
 
-	msn = !g_strncasecmp(who, "msn/", 4);
+	msn = !g_ascii_strncasecmp(who, "msn/", 4);
 
 	if( strncmp(who, "+", 1) == 0 ) {
 		/* we have an sms to be sent */
@@ -4395,7 +4395,7 @@ unsigned int yahoo_send_typing(PurpleCon
 {
 	YahooData *yd = gc->proto_data;
 	struct yahoo_p2p_data *p2p_data;
-	gboolean msn = !g_strncasecmp(who, "msn/", 4);
+	gboolean msn = !g_ascii_strncasecmp(who, "msn/", 4);
 	struct yahoo_packet *pkt = NULL;
 
 	/* Don't do anything if sms is being typed */
@@ -4668,7 +4668,7 @@ void yahoo_add_buddy(PurpleConnection *g
 		return;
 
 	f = yahoo_friend_find(gc, bname);
-	msn = !g_strncasecmp(bname, "msn/", 4);
+	msn = !g_ascii_strncasecmp(bname, "msn/", 4);
 
 	g = purple_buddy_get_group(buddy);
 	if (g)
============================================================
--- libpurple/util.c	c2aa0df87c360230a718f41b5877275fee28612a
+++ libpurple/util.c	c4d036a2d4968d1873234c4e0f034c4ee84b1055
@@ -3820,7 +3820,7 @@ find_header_content(const char *data, si
 	/* Note: data is _not_ nul-terminated.  */
 	if (data_len > header_len) {
 		if (header[0] == '\n')
-			p = (g_strncasecmp(data, header + 1, header_len - 1) == 0) ? data : NULL;
+			p = (g_ascii_strncasecmp(data, header + 1, header_len - 1) == 0) ? data : NULL;
 		if (!p)
 			p = purple_strcasestr(data, header);
 		if (p)
@@ -3857,7 +3857,7 @@ content_is_chunked(const char *data, siz
 content_is_chunked(const char *data, size_t data_len)
 {
 	const char *p = find_header_content(data, data_len, "\nTransfer-Encoding: ", sizeof("\nTransfer-Encoding: ") - 1);
-	if (p && g_strncasecmp(p, "chunked", 7) == 0)
+	if (p && g_ascii_strncasecmp(p, "chunked", 7) == 0)
 		return TRUE;
 
 	return FALSE;


More information about the Commits mailing list