changeset 5953:bc71bd31c223

[gaim-migrate @ 6397] More checking for empty strings during account loading. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Wed, 25 Jun 2003 03:40:03 +0000
parents a6f7d4f01981
children fccc33d4b8fa
files src/account.c
diffstat 1 files changed, 17 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/src/account.c	Tue Jun 24 19:27:59 2003 +0000
+++ b/src/account.c	Wed Jun 25 03:40:03 2003 +0000
@@ -841,7 +841,7 @@
 		}
 	}
 	else if (data->tag == TAG_PASSWORD) {
-		if (strcmp(buffer, "")) {
+		if (*buffer != '\0') {
 			if (data->in_proxy) {
 				gaim_proxy_info_set_password(data->proxy_info, buffer);
 			}
@@ -851,12 +851,18 @@
 			}
 		}
 	}
-	else if (data->tag == TAG_ALIAS)
-		gaim_account_set_alias(data->account, buffer);
-	else if (data->tag == TAG_USERINFO)
-		gaim_account_set_user_info(data->account, buffer);
-	else if (data->tag == TAG_BUDDYICON)
-		gaim_account_set_buddy_icon(data->account, buffer);
+	else if (data->tag == TAG_ALIAS) {
+		if (*buffer != '\0')
+			gaim_account_set_alias(data->account, buffer);
+	}
+	else if (data->tag == TAG_USERINFO) {
+		if (*buffer != '\0')
+			gaim_account_set_user_info(data->account, buffer);
+	}
+	else if (data->tag == TAG_BUDDYICON) {
+		if (*buffer != '\0')
+			gaim_account_set_buddy_icon(data->account, buffer);
+	}
 	else if (data->tag == TAG_TYPE) {
 		if (data->in_proxy) {
 			if (!strcmp(buffer, "global"))
@@ -876,15 +882,15 @@
 		}
 	}
 	else if (data->tag == TAG_HOST) {
-		if (data->in_proxy && strcmp(buffer, ""))
+		if (data->in_proxy && *buffer != '\0')
 			gaim_proxy_info_set_host(data->proxy_info, buffer);
 	}
 	else if (data->tag == TAG_PORT) {
-		if (data->in_proxy && strcmp(buffer, ""))
+		if (data->in_proxy && *buffer != '\0')
 			gaim_proxy_info_set_port(data->proxy_info, atoi(buffer));
 	}
 	else if (data->tag == TAG_SETTING) {
-		if (strcmp(buffer, "")) {
+		if (*buffer != '\0') {
 			if (data->setting_ui != NULL) {
 				if (data->setting_type == GAIM_PREF_STRING)
 					gaim_account_set_ui_string(data->account, data->setting_ui,
@@ -920,7 +926,7 @@
 			gaim_proxy_info_destroy(data->proxy_info);
 			data->proxy_info = NULL;
 		}
-		else if (strcmp(buffer, "")) {
+		else if (*buffer != '\0') {
 			gaim_account_set_proxy_info(data->account, data->proxy_info);
 		}
 	}