changeset 22425:a491ebed7f3a

I realized that I don't like initializing variables when I declare them if I can avoid it
author Mark Doliner <mark@kingant.net>
date Thu, 06 Mar 2008 07:29:39 +0000
parents 35c4a9b4a699
children 5762dcb1909c
files libpurple/protocols/oscar/oscar.c
diffstat 1 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/protocols/oscar/oscar.c	Thu Mar 06 06:59:56 2008 +0000
+++ b/libpurple/protocols/oscar/oscar.c	Thu Mar 06 07:29:39 2008 +0000
@@ -4980,11 +4980,13 @@
 		switch (curitem->type) {
 			case 0x0000: { /* Buddy */
 				if (curitem->name) {
-					struct aim_ssi_item *groupitem = aim_ssi_itemlist_find(od->ssi.local, curitem->gid, 0x0000);
-					char *gname = groupitem ? groupitem->name : NULL;
-					char *gname_utf8 = gname ? oscar_utf8_try_convert(gc->account, gname) : NULL;
-					char *alias = aim_ssi_getalias(od->ssi.local, gname, curitem->name);
-					char *alias_utf8;
+					struct aim_ssi_item *groupitem;
+					char *gname, *gname_utf8, *alias, *alias_utf8;
+
+					groupitem = aim_ssi_itemlist_find(od->ssi.local, curitem->gid, 0x0000);
+					gname = groupitem ? groupitem->name : NULL;
+					gname_utf8 = gname ? oscar_utf8_try_convert(gc->account, gname) : NULL;
+					alias = aim_ssi_getalias(od->ssi.local, gname, curitem->name);
 
 					g = purple_find_group(gname_utf8 ? gname_utf8 : _("Orphans"));
 					if (g == NULL) {
@@ -5039,8 +5041,11 @@
 			} break;
 
 			case 0x0001: { /* Group */
-				char *gname = curitem->name;
-				char *gname_utf8 = gname ? oscar_utf8_try_convert(gc->account, gname) : NULL;
+				char *gname;
+				char *gname_utf8;
+
+				gname = curitem->name;
+				gname_utf8 = gname ? oscar_utf8_try_convert(gc->account, gname) : NULL;
 				if (gname_utf8 != NULL && purple_find_group(gname_utf8) == NULL) {
 					g = purple_group_new(gname_utf8);
 					purple_blist_add_group(g, NULL);