libpurple/accounts.c

branch
soc.2013.gobjectification
changeset 34889
4ea2da14cd0e
parent 34864
0e292d8887de
child 34935
686fa55b0deb
child 36637
9b0109ae118d
--- a/libpurple/accounts.c	Thu Aug 22 00:32:28 2013 +0530
+++ b/libpurple/accounts.c	Thu Aug 22 01:35:32 2013 +0530
@@ -722,7 +722,7 @@
 }
 
 void
-purple_accounts_reorder(PurpleAccount *account, gint new_index)
+purple_accounts_reorder(PurpleAccount *account, guint new_index)
 {
 	gint index;
 	GList *l;
@@ -732,7 +732,7 @@
 
 	index = g_list_index(accounts, account);
 
-	if (index == -1) {
+	if (index < 0) {
 		purple_debug_error("account",
 				   "Unregistered account (%s) discovered during reorder!\n",
 				   purple_account_get_username(account));
@@ -741,7 +741,7 @@
 
 	l = g_list_nth(accounts, index);
 
-	if (new_index > index)
+	if (new_index > (guint)index)
 		new_index--;
 
 	/* Remove the old one. */

mercurial