changeset 13498:94d6dedf700a

[gaim-migrate @ 15874] Reformat and refactor a couple small blocks of code so I can understand what is happening. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Mon, 13 Mar 2006 18:57:00 +0000
parents 2f0d4179ec05
children 231c58da452d
files src/protocols/yahoo/yahoo_profile.c
diffstat 1 files changed, 10 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/yahoo/yahoo_profile.c	Mon Mar 13 18:51:47 2006 +0000
+++ b/src/protocols/yahoo/yahoo_profile.c	Mon Mar 13 18:57:00 2006 +0000
@@ -844,13 +844,19 @@
 	/* Check whether the profile is written in a supported language */
 	for (lang = 0;; lang += 1) {
 		last_updated_string = profile_langs[lang].last_updated_string;
-	if (!last_updated_string) break;
+		if (!last_updated_string)
+			break;
+
 		p = strstr(url_text, last_updated_string);
-		if (p && profile_langs[lang].det && !strstr(url_text, profile_langs[lang].det)) {
-			p = NULL;
+
+		if (p) {
+			if (profile_langs[lang].det && !strstr(url_text, profile_langs[lang].det))
+				p = NULL;
+			else
+				break;
 		}
-	if (p) break;
 	}
+
 	if (p) {
 		for (strid = 0; profile_strings[strid].lang != XX; strid += 1) {
 			if (profile_strings[strid].lang == profile_langs[lang].lang) break;