Return -1 as 'invalid port' if passed NULL in gaim_dnsquery_get_port()

Sun, 25 Feb 2007 19:18:12 +0000

author
Evan Schoenberg <evands@pidgin.im>
date
Sun, 25 Feb 2007 19:18:12 +0000
changeset 15764
0000075a63fb
parent 15763
2b529e4350bc
child 15768
7c51fc8bff13

Return -1 as 'invalid port' if passed NULL in gaim_dnsquery_get_port()

libpurple/dnsquery.c file | annotate | diff | comparison | revisions
--- a/libpurple/dnsquery.c	Sun Feb 25 18:43:25 2007 +0000
+++ b/libpurple/dnsquery.c	Sun Feb 25 19:18:12 2007 +0000
@@ -938,7 +938,7 @@
 int
 gaim_dnsquery_get_port(GaimDnsQueryData *query_data)
 {
-	g_return_val_if_fail(query_data != NULL, NULL);
+	g_return_val_if_fail(query_data != NULL, -1);
 
 	return query_data->port;	
 }

mercurial