pidgin: 375d92d7: Add a comment to clarify code I initiall...

rlaager at rlaager at
Thu Nov 27 15:40:46 EST 2008

Revision: 375d92d7b17cfbfd35f020ae41f146f8a0bfb5c4
Ancestor: ee99edab4b132752203d89019ef438df66e34cfb
Author: rlaager at
Date: 2008-11-27T05:49:01
Branch: im.pidgin.pidgin

Modified files:


Add a comment to clarify code I initially thought was broken.

-------------- next part --------------
--- libpurple/roomlist.c	ad55c2f49f87a510d56d6cb9a92b7a3108a0f876
+++ libpurple/roomlist.c	f47bcbcbdd78502b0140d8108256086583c4379e
@@ -265,6 +265,11 @@ void purple_roomlist_room_add_field(Purp
 	g_return_if_fail(room != NULL);
 	g_return_if_fail(list->fields != NULL);
+	/* If this is the first call for this room, grab the first field in
+	 * the Roomlist's fields.  Otherwise, grab the field that is one
+	 * more than the number of fields already present for the room.
+         * (This works because g_list_nth_data() is zero-indexed and
+         * g_list_length() is one-indexed.) */
 	if (!room->fields)
 		f = list->fields->data;

More information about the Commits mailing list