mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-24 21:16:15 +01:00
Fix global variable name hidden by local variables in gio/gthreadedresolver.c
This commit is contained in:
parent
49d0c5a90b
commit
bd5d867320
@ -302,19 +302,19 @@ do_lookup_by_address (GTask *task,
|
||||
GCancellable *cancellable)
|
||||
{
|
||||
GInetAddress *address = task_data;
|
||||
struct sockaddr_storage sockaddr;
|
||||
gsize sockaddr_size;
|
||||
struct sockaddr_storage sockaddr_address;
|
||||
gsize sockaddr_address_size;
|
||||
GSocketAddress *gsockaddr;
|
||||
gchar name[NI_MAXHOST];
|
||||
gint retval;
|
||||
|
||||
gsockaddr = g_inet_socket_address_new (address, 0);
|
||||
g_socket_address_to_native (gsockaddr, (struct sockaddr *)&sockaddr,
|
||||
sizeof (sockaddr), NULL);
|
||||
sockaddr_size = g_socket_address_get_native_size (gsockaddr);
|
||||
g_socket_address_to_native (gsockaddr, (struct sockaddr *)&sockaddr_address,
|
||||
sizeof (sockaddr_address), NULL);
|
||||
sockaddr_address_size = g_socket_address_get_native_size (gsockaddr);
|
||||
g_object_unref (gsockaddr);
|
||||
|
||||
retval = getnameinfo ((struct sockaddr *)&sockaddr, sockaddr_size,
|
||||
retval = getnameinfo ((struct sockaddr *) &sockaddr_address, sockaddr_address_size,
|
||||
name, sizeof (name), NULL, 0, NI_NAMEREQD);
|
||||
if (retval == 0)
|
||||
g_task_return_pointer (task, g_strdup (name), g_free);
|
||||
|
Loading…
Reference in New Issue
Block a user