Mercurial > pidgin
changeset 24124:dab570436008
Simplify two bits of code a little
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 16 Sep 2008 23:32:15 +0000 |
parents | 14c5a8bbaa8d |
children | f323cdae2404 |
files | libpurple/dnsquery.c |
diffstat | 1 files changed, 2 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/libpurple/dnsquery.c Tue Sep 16 23:30:47 2008 +0000 +++ b/libpurple/dnsquery.c Tue Sep 16 23:32:15 2008 +0000 @@ -133,10 +133,7 @@ PurpleDnsQueryUiOps *ops = purple_dnsquery_get_ui_ops(); if (ops && ops->resolve_host) - { - if (ops->resolve_host(query_data, purple_dnsquery_resolved, purple_dnsquery_failed)) - return TRUE; - } + return ops->resolve_host(query_data, purple_dnsquery_resolved, purple_dnsquery_failed); return FALSE; } @@ -634,7 +631,7 @@ query_data->data = data; query_data->resolver = NULL; - if (strlen(query_data->hostname) == 0) + if (*query_data->hostname == '\0') { purple_dnsquery_destroy(query_data); g_return_val_if_reached(NULL);