diff finch/gntrequest.c @ 18222:ef65d43190e5

Fix a few runtime warnings.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Thu, 21 Jun 2007 21:32:13 +0000
parents ab6d2763b8d8
children f23a7736586f b25cb0775be3
line wrap: on
line diff
--- a/finch/gntrequest.c	Thu Jun 21 18:08:48 2007 +0000
+++ b/finch/gntrequest.c	Thu Jun 21 21:32:13 2007 +0000
@@ -399,7 +399,7 @@
 							purple_request_field_string_get_default_value(field));
 				gnt_entry_set_masked(GNT_ENTRY(entry),
 						purple_request_field_string_is_masked(field));
-				if (purple_str_has_prefix(hint, "screenname")) {
+				if (hint && purple_str_has_prefix(hint, "screenname")) {
 					PurpleBlistNode *node = purple_blist_get_root();
 					gboolean offline = purple_str_has_suffix(hint, "all");
 					for (; node; node = purple_blist_node_next(node, offline)) {
@@ -673,7 +673,7 @@
 			switch (pt) {
 				case PURPLE_PREF_INT:
 				{
-					long int tmp;
+					long int tmp = GPOINTER_TO_INT(val);
 					if (type == PURPLE_REQUEST_FIELD_LIST) /* Lists always return string */
 						sscanf(val, "%ld", &tmp);
 					purple_prefs_set_int(id, (gint)tmp);