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

Gary Kramlich <[email protected]>
Newsgroups gmane.comp.gnome.gaim.cvs
Message-ID <[email protected]>
Changeset: 387f778190f13626b694a11f05a0cc22db006491
Author:	 Gary Kramlich <[email protected]>
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);

_______________________________________________
Commits mailing list
[email protected]
https://pidgin.im/cgi-bin/mailman/listinfo/commits
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.