changeset 28444:e35043e96a1a

break early if we found the right saved status, and rewrote the exit logic of the outer loop to be slightly more clear
author Ka-Hing Cheung <khc@hxbc.us>
date Sun, 25 Oct 2009 22:18:08 +0000
parents 6e703969157d
children 2c1677e123dc
files pidgin/gtkstatusbox.c
diffstat 1 files changed, 8 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- 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;
+						}
 					}
 				}