changeset 10130:096197a628bf

[gaim-migrate @ 11193] Small suggestions from Evan Schoenberg and a few whitespaces fixes. committer: Tailor Script <tailor@pidgin.im>
author Mark Doliner <mark@kingant.net>
date Sat, 23 Oct 2004 14:59:27 +0000
parents 7d2d9db2aa85
children a6c3b931214f
files src/protocols/oscar/buddylist.c src/protocols/oscar/oscar.c src/protocols/oscar/rxhandlers.c
diffstat 3 files changed, 13 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/oscar/buddylist.c	Thu Oct 21 18:42:29 2004 +0000
+++ b/src/protocols/oscar/buddylist.c	Sat Oct 23 14:59:27 2004 +0000
@@ -63,7 +63,7 @@
 
 	aim_tlvlist_free(&tlvlist);
 
-	return ret;  
+	return ret;
 }
 
 /*
@@ -193,7 +193,7 @@
 		return -ENOMEM;
 
 	snacid = aim_cachesnac(sess, 0x0003, 0x000b, 0x0000, NULL, 0);
-	
+
 	aim_putsnac(&fr->data, 0x0003, 0x000b, 0x0000, snacid);
 	aim_putuserinfo(&fr->data, info);
 
@@ -220,7 +220,7 @@
 		return -ENOMEM;
 
 	snacid = aim_cachesnac(sess, 0x0003, 0x000c, 0x0000, NULL, 0);
-	
+
 	aim_putsnac(&fr->data, 0x0003, 0x000c, 0x0000, snacid);
 	aimbs_put8(&fr->data, strlen(sn));
 	aimbs_putraw(&fr->data, sn, strlen(sn));
--- a/src/protocols/oscar/oscar.c	Thu Oct 21 18:42:29 2004 +0000
+++ b/src/protocols/oscar/oscar.c	Sat Oct 23 14:59:27 2004 +0000
@@ -2881,6 +2881,9 @@
 	info = va_arg(ap, aim_userinfo_t *);
 	va_end(ap);
 
+	g_return_val_if_fail(info != NULL, 1);
+	g_return_val_if_fail(info->sn != NULL, 1);
+
 	if (info->present & AIM_USERINFO_PRESENT_CAPABILITIES)
 		caps = info->capabilities;
 
@@ -4071,7 +4074,8 @@
 	va_end(ap);
 
 	gaim_debug_error("oscar",
-			   "Message error with data %s and reason %hu\n", data, reason);
+			   "Message error with data %s and reason %hu\n",
+				(data != NULL ? data : ""), reason);
 
 /* BBB */
 #if 0
@@ -4736,7 +4740,9 @@
 	va_end(ap);
 
 	gaim_debug_info("oscar",
-			   "Disconnected.  Code is 0x%04x and msg is %s\n", code, msg);
+			   "Disconnected.  Code is 0x%04x and msg is %s\n", code,
+				(msg != NULL ? msg : ""));
+
 	if ((fr) && (fr->conn) && (fr->conn->type == AIM_CONN_TYPE_BOS)) {
 		if (code == 0x0001) {
 			gc->wants_to_die = TRUE;
--- a/src/protocols/oscar/rxhandlers.c	Thu Oct 21 18:42:29 2004 +0000
+++ b/src/protocols/oscar/rxhandlers.c	Sat Oct 23 14:59:27 2004 +0000
@@ -131,7 +131,7 @@
 
 	for (cur = (aim_module_t *)sess->modlistv; cur; cur = cur->next) {
 
-		if (!(cur->flags & AIM_MODFLAG_MULTIFAMILY) && 
+		if (!(cur->flags & AIM_MODFLAG_MULTIFAMILY) &&
 				(cur->family != snac.family))
 			continue;
 
@@ -154,7 +154,7 @@
 
 	for (cur = (aim_module_t *)sess->modlistv; cur; cur = cur->next) {
 
-		if (!(cur->flags & AIM_MODFLAG_MULTIFAMILY) && 
+		if (!(cur->flags & AIM_MODFLAG_MULTIFAMILY) &&
 				(cur->family != snac.family))
 			continue;