/pidgin/main: 387f778190f1: Avoid creating a variable we don't need

Gary Kramlich grim at reaperworld.com
Wed Dec 23 23:33:34 EST 2015


Changeset: 387f778190f13626b694a11f05a0cc22db006491
Author:	 Gary Kramlich <grim at reaperworld.com>
Date:	 2015-12-17 20:05 -0600
Branch:	 use-gresolver
URL: https://hg.pidgin.im/pidgin/main/rev/387f778190f1

Description:

Avoid creating a variable we don't need

diffstat:

 libpurple/network.c |  4 +---
 1 files changed, 1 insertions(+), 3 deletions(-)

diffs (18 lines):

diff --git a/libpurple/network.c b/libpurple/network.c
--- a/libpurple/network.c
+++ b/libpurple/network.c
@@ -979,13 +979,11 @@ nm_dbus_name_owner_changed_cb(DBusGProxy
 
 static GInetAddress *
 purple_network_ip_lookup(const gchar *hostname) {
-	GResolver *resolver = NULL;
 	GError *error = NULL;
 	GList *addresses =NULL, *l = NULL;
 	GInetAddress *address = NULL;
 
-	resolver = g_resolver_get_default();
-	addresses = g_resolver_lookup_by_name(resolver, hostname, NULL, &error);
+	addresses = g_resolver_lookup_by_name(g_resolver_get_default(), hostname, NULL, &error);
 
 	if(addresses == NULL) {
 		purple_debug_info("network", "lookup of IP address failed: %s\n", error->message);



More information about the Commits mailing list