diff libpurple/protocols/myspace/myspace.c @ 26859:ef61a2b746bd

Qulogic pointed out that glib has G_N_ELEMENTS already
author Ka-Hing Cheung <khc@hxbc.us>
date Sun, 10 May 2009 22:29:28 +0000
parents 0b97f73fa3d2
children 1d2b813faca7
line wrap: on
line diff
--- a/libpurple/protocols/myspace/myspace.c	Sun May 10 22:24:37 2009 +0000
+++ b/libpurple/protocols/myspace/myspace.c	Sun May 10 22:29:28 2009 +0000
@@ -861,10 +861,10 @@
 		{ "FriendRequest", MSIM_INBOX_FRIEND_REQUEST, "http://messaging.myspace.com/index.cfm?fuseaction=mail.friendRequests", NULL },
 		{ "PictureComment", MSIM_INBOX_PICTURE_COMMENT, "http://home.myspace.com/index.cfm?fuseaction=user", NULL }
 	};
-	const gchar *froms[ARRAY_LENGTH(message_types) + 1] = { "" },
-		*tos[ARRAY_LENGTH(message_types) + 1] = { "" },
-		*urls[ARRAY_LENGTH(message_types) + 1] = { "" },
-		*subjects[ARRAY_LENGTH(message_types) + 1] = { "" };
+	const gchar *froms[G_N_ELEMENTS(message_types) + 1] = { "" },
+		*tos[G_N_ELEMENTS(message_types) + 1] = { "" },
+		*urls[G_N_ELEMENTS(message_types) + 1] = { "" },
+		*subjects[G_N_ELEMENTS(message_types) + 1] = { "" };
 
 	g_return_if_fail(reply != NULL);
 
@@ -886,7 +886,7 @@
 
 	n = 0;
 
-	for (i = 0; i < sizeof(message_types) / sizeof(message_types[0]); ++i) {
+	for (i = 0; i < G_N_ELEMENTS(message_types); ++i) {
 		const gchar *key;
 		guint bit;