# HG changeset patch # User Mark Doliner # Date 1204788579 0 # Node ID a491ebed7f3abf841d5e375b5153d5ee368c3f86 # Parent 35c4a9b4a69910d307d18482089dfe76d8a5b157 I realized that I don't like initializing variables when I declare them if I can avoid it diff -r 35c4a9b4a699 -r a491ebed7f3a libpurple/protocols/oscar/oscar.c --- 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);