agent: Tidy up a few variable references
authorPhilip Withnall <philip.withnall@collabora.co.uk>
Fri, 8 Aug 2014 10:29:41 +0000 (11:29 +0100)
committerOlivier CrĂȘte <olivier.crete@collabora.com>
Thu, 21 Aug 2014 18:33:10 +0000 (14:33 -0400)
This simplifies the code a little. No functional changes.

agent/agent.c

index 63c182d..836aedd 100644 (file)
@@ -1718,20 +1718,19 @@ pseudo_tcp_socket_write_packet (PseudoTcpSocket *psocket,
     NiceAddress *addr;
 
     sock = component->selected_pair.local->sockptr;
+    addr = &component->selected_pair.remote->addr;
 
     if (nice_debug_is_enabled ()) {
       gchar tmpbuf[INET6_ADDRSTRLEN];
-      nice_address_to_string (&component->selected_pair.remote->addr, tmpbuf);
+      nice_address_to_string (addr, tmpbuf);
 
       nice_debug (
           "Agent %p : s%d:%d: sending %d bytes on socket %p (FD %d) to [%s]:%d",
           component->agent, component->stream->id, component->id, len,
           sock->fileno, g_socket_get_fd (sock->fileno), tmpbuf,
-          nice_address_get_port (&component->selected_pair.remote->addr));
+          nice_address_get_port (addr));
     }
 
-    addr = &component->selected_pair.remote->addr;
-
     if (nice_socket_send (sock, addr, len, buffer))
       return WR_SUCCESS;
   } else {