Mercurial > pidgin.yaz
changeset 15710:d253c87a6a1f
Remove a g_return_val_if_fail() which isn't needed, made gaim_dnsquery_get_port() return an unsigned short and return 0 if query_data is NULL, and fixed a whitespace mistake
author | Evan Schoenberg <evan.s@dreskin.net> |
---|---|
date | Sun, 25 Feb 2007 21:41:59 +0000 |
parents | fe5398f498ee |
children | 47ca3cfedb32 7ac07c5fb1c2 a34da2c2d8ba |
files | libpurple/dnsquery.c libpurple/dnsquery.h |
diffstat | 2 files changed, 7 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/dnsquery.c Sun Feb 25 19:19:12 2007 +0000 +++ b/libpurple/dnsquery.c Sun Feb 25 21:41:59 2007 +0000 @@ -477,7 +477,7 @@ handle_next_queued_request(); return; } - + /* * If we have any children, attempt to have them perform the DNS * query. If we're able to send the query then resolver will be @@ -935,10 +935,10 @@ return query_data->hostname; } -int +unsigned short gaim_dnsquery_get_port(GaimDnsQueryData *query_data) { - g_return_val_if_fail(query_data != NULL, -1); + g_return_val_if_fail(query_data != NULL, 0); return query_data->port; } @@ -952,8 +952,9 @@ GaimDnsQueryUiOps * gaim_dnsquery_get_ui_ops(void) { - g_return_val_if_fail(dns_query_ui_ops != NULL, NULL); - + /* It is perfectly acceptable for dns_query_ui_ops to be NULL; this just + * means that the default platform-specific implementation will be used. + */ return dns_query_ui_ops; }
--- a/libpurple/dnsquery.h Sun Feb 25 19:19:12 2007 +0000 +++ b/libpurple/dnsquery.h Sun Feb 25 21:41:59 2007 +0000 @@ -121,7 +121,7 @@ * @param query_data The DNS query * @return The port. */ -int gaim_dnsquery_get_port(GaimDnsQueryData *query_data); +unsigned short gaim_dnsquery_get_port(GaimDnsQueryData *query_data); /** * Initializes the DNS query subsystem.