summaryrefslogtreecommitdiff
path: root/gdhcp
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2012-07-15 19:29:26 -0300
committerMarcel Holtmann <marcel@holtmann.org>2012-07-15 19:29:26 -0300
commitfa80c3b322bbed2f6ec471631077b4f0779824c2 (patch)
tree5c8ab3899442fb56ce82e82c428c89e6580249c0 /gdhcp
parented12a4d8fac2ece0e400b81bae1f76c2420a1ec0 (diff)
downloadconnman-fa80c3b322bbed2f6ec471631077b4f0779824c2.tar.gz
connman-fa80c3b322bbed2f6ec471631077b4f0779824c2.tar.bz2
connman-fa80c3b322bbed2f6ec471631077b4f0779824c2.zip
gdhcp: Avoid shadowing address string variable
Diffstat (limited to 'gdhcp')
-rw-r--r--gdhcp/client.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdhcp/client.c b/gdhcp/client.c
index ec1b2a2c..7e8e494c 100644
--- a/gdhcp/client.c
+++ b/gdhcp/client.c
@@ -1665,7 +1665,7 @@ static GList *get_addresses(GDHCPClient *dhcp_client,
if (addr_count > 0 && st == 0) {
/* We only support one address atm */
- char str[INET6_ADDRSTRLEN + 1];
+ char addr_str[INET6_ADDRSTRLEN + 1];
if (preferred > valid)
/* RFC 3315, 22.6 */
@@ -1674,11 +1674,11 @@ static GList *get_addresses(GDHCPClient *dhcp_client,
dhcp_client->T1 = T1;
dhcp_client->T2 = T2;
- inet_ntop(AF_INET6, &addr, str, INET6_ADDRSTRLEN);
+ inet_ntop(AF_INET6, &addr, addr_str, INET6_ADDRSTRLEN);
debug(dhcp_client, "count %d addr %s T1 %u T2 %u",
- addr_count, str, T1, T2);
+ addr_count, addr_str, T1, T2);
- list = g_list_append(list, g_strdup(str));
+ list = g_list_append(list, g_strdup(addr_str));
if (code == G_DHCPV6_IA_NA)
memcpy(&dhcp_client->ia_na, &addr,