pidgin: fa0c3fc6: Simplify two bits of code a little

markdoliner at pidgin.im markdoliner at pidgin.im
Tue Sep 16 19:40:59 EDT 2008


-----------------------------------------------------------------
Revision: fa0c3fc6e6660e7a488bbaae03dc152b9925cc6c
Ancestor: af2a2fd842aa6e0777b03e5ce97d197c200197af
Author: markdoliner at pidgin.im
Date: 2008-09-16T23:32:15
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/fa0c3fc6e6660e7a488bbaae03dc152b9925cc6c

Modified files:
        libpurple/dnsquery.c

ChangeLog: 

Simplify two bits of code a little

-------------- next part --------------
============================================================
--- libpurple/dnsquery.c	a704b02b55c3dd2b1c5d27908d765f627fa62407
+++ libpurple/dnsquery.c	c43b686683c20d229badf2a041df5182cc696771
@@ -133,10 +133,7 @@ purple_dnsquery_ui_resolve(PurpleDnsQuer
 	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 @@ purple_dnsquery_a(const char *hostname, 
 	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);


More information about the Commits mailing list