pidgin: 95730d90: break early if we found the right saved ...

khc at pidgin.im khc at pidgin.im
Tue Oct 27 04:01:32 EDT 2009


-----------------------------------------------------------------
Revision: 95730d90c9ec4fc3eb3025b9c16a3d0129c829c5
Ancestor: 8a16e13a3f946eeeab83667b81679e1230643dbc
Author: khc at pidgin.im
Date: 2009-10-25T22:18:08
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/95730d90c9ec4fc3eb3025b9c16a3d0129c829c5

Modified files:
        pidgin/gtkstatusbox.c

ChangeLog: 

break early if we found the right saved status, and rewrote the exit logic
of the outer loop to be slightly more clear


-------------- next part --------------
============================================================
--- pidgin/gtkstatusbox.c	001d99b96ee3bf40a213adda7b9251fb7cfd2534
+++ pidgin/gtkstatusbox.c	e46d469c3fee24adc56c56660bb42df79ac6016e
@@ -2453,14 +2453,17 @@ activate_currently_selected_status(Pidgi
 								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;
+						}
 					}
 				}
 


More information about the Commits mailing list