changeset 9626:afd069368860

[gaim-migrate @ 10470] Fix bug 996887, Core/Solaris8/Gaim 0.80: Display Account. It was a printf("%s", NULL); problem on Solaris committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 31 Jul 2004 23:30:01 +0000
parents 3ec0b63d4f2e
children 8a540b8a5f70
files src/protocols/oscar/oscar.c
diffstat 1 files changed, 9 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/oscar.c	Sat Jul 31 23:08:52 2004 +0000
+++ b/src/protocols/oscar/oscar.c	Sat Jul 31 23:30:01 2004 +0000
@@ -5046,10 +5046,13 @@
 	va_end(ap);
 
 	gaim_debug_misc("oscar",
-			   "account info: because of %s, perms=0x%04x, err=0x%04x, url=%s, sn=%s, email=%s\n",
-		change ? "change" : "request", perms, err, url, sn, email);
-
-	if (err && url) {
+					"account info: because of %s, perms=0x%04x, err=0x%04x, url=%s, sn=%s, email=%s\n",
+					change ? "change" : "request", perms, err,
+					(url != NULL) ? url : "(null)",
+					(sn != NULL) ? sn : "(null)",
+					(email != NULL) ? email : "(null)");
+
+	if ((err > 0) && (url != NULL)) {
 		char *dialog_msg;
 		char *dialog_top = g_strdup_printf(_("Error Changing Account Info"));
 		switch (err) {
@@ -5081,13 +5084,13 @@
 		return 1;
 	}
 
-	if (sn) {
+	if (sn != NULL) {
 		char *dialog_msg = g_strdup_printf(_("Your screen name is currently formatted as follows:\n%s"), sn);
 		gaim_notify_info(gc, NULL, _("Account Info"), dialog_msg);
 		g_free(dialog_msg);
 	}
 
-	if (email) {
+	if (email != NULL) {
 		char *dialog_msg = g_strdup_printf(_("The email address for %s is %s"), 
 						   gaim_account_get_username(gaim_connection_get_account(gc)), email);
 		gaim_notify_info(gc, NULL, _("Account Info"), dialog_msg);