# HG changeset patch # User Ka-Hing Cheung # Date 1256509088 0 # Node ID e35043e96a1a4a8d2ef0fad90df81b10eb416c8f # Parent 6e703969157dc0205d7c04a4cc63e6a6de0277d3 break early if we found the right saved status, and rewrote the exit logic of the outer loop to be slightly more clear diff -r 6e703969157d -r e35043e96a1a pidgin/gtkstatusbox.c --- a/pidgin/gtkstatusbox.c Sun Oct 25 15:26:48 2009 +0000 +++ b/pidgin/gtkstatusbox.c Sun Oct 25 22:18:08 2009 +0000 @@ -2453,14 +2453,17 @@ const PurpleStatusType *sub_type = purple_savedstatus_substatus_get_type(sub); const char *subtype_status_id = purple_status_type_get_id(sub_type); if (subtype_status_id && !strcmp(subtype_status_id, - purple_status_type_get_id(acct_status_type))) + purple_status_type_get_id(acct_status_type))) { found = TRUE; + break; + } } } - if (!found) - continue; - saved_status = ss; - break; + + if (found) { + saved_status = ss; + break; + } } }