strncmp -> g_str_equal

Sun, 25 Oct 2009 23:45:02 +0000

author
Ka-Hing Cheung <khc@pidgin.im>
date
Sun, 25 Oct 2009 23:45:02 +0000
changeset 28747
3863f82c7edc
parent 28746
47618d069f02
child 28748
53f15767337e

strncmp -> g_str_equal

pidgin/gtkstatusbox.c file | annotate | diff | comparison | revisions
--- a/pidgin/gtkstatusbox.c	Sun Oct 25 23:39:45 2009 +0000
+++ b/pidgin/gtkstatusbox.c	Sun Oct 25 23:45:02 2009 +0000
@@ -2393,7 +2393,7 @@
 			acct_status_type = find_status_type_by_index(status_box->token_status_account, active);
 			id = purple_status_type_get_id(acct_status_type);
 
-			if (strncmp(id, purple_status_get_id(status), strlen(id)) == 0)
+			if (g_str_equal(id, purple_status_get_id(status)))
 			{
 				/* Selected status and previous status is the same */
 				if (purple_strequal(message, purple_status_get_attr_string(status, "message")))
@@ -2495,7 +2495,7 @@
 		status_type = find_status_type_by_index(status_box->account, active);
 		id = purple_status_type_get_id(status_type);
 
-		if (strncmp(id, purple_status_get_id(status), strlen(id)) == 0)
+		if (g_str_equal(id, purple_status_get_id(status)))
 		{
 			/* Selected status and previous status is the same */
 			if (purple_strequal(message, purple_status_get_attr_string(status, "message")))

mercurial