[gaim-migrate @ 15874]

Mon, 13 Mar 2006 18:57:00 +0000

author
Richard Laager <rlaager@pidgin.im>
date
Mon, 13 Mar 2006 18:57:00 +0000
changeset 13499
f6c508815869
parent 13498
6a03aa3b5c1a
child 13500
1cf2401c310c

[gaim-migrate @ 15874]
Reformat and refactor a couple small blocks of code so I can understand what is happening.

src/protocols/yahoo/yahoo_profile.c file | annotate | diff | comparison | revisions
--- 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;

mercurial