summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Gampe2014-11-24 12:43:53 -0600
committerAndreas Gampe2014-11-24 12:43:53 -0600
commita5d5d8477357078a636c7e0d1e80c128cfd25262 (patch)
tree1d1b582a5dcef7b2ab7e5ad38d98b5e33c3dd6bd /libnetutils
parent7f187c5f95d6bf0514e71e0e074768bd5395d45f (diff)
downloadplatform-system-core-a5d5d8477357078a636c7e0d1e80c128cfd25262.tar.gz
platform-system-core-a5d5d8477357078a636c7e0d1e80c128cfd25262.tar.xz
platform-system-core-a5d5d8477357078a636c7e0d1e80c128cfd25262.zip
Libnetutils: Remove unused functions & variables
For build-system CFLAGS clean-up, remove unused functions and variables. Change-Id: I40a78d5a532dc32b53beb1cfc1b7645bab8add16
Diffstat (limited to 'libnetutils')
-rw-r--r--libnetutils/dhcp_utils.c9
-rw-r--r--libnetutils/dhcpclient.c2
-rw-r--r--libnetutils/ifc_utils.c1
-rw-r--r--libnetutils/packet.c2
4 files changed, 2 insertions, 12 deletions
diff --git a/libnetutils/dhcp_utils.c b/libnetutils/dhcp_utils.c
index e1df87481..0f7c384c5 100644
--- a/libnetutils/dhcp_utils.c
+++ b/libnetutils/dhcp_utils.c
@@ -166,14 +166,6 @@ static int fill_ip_info(const char *interface,
166 return 0; 166 return 0;
167} 167}
168 168
169static const char *ipaddr_to_string(in_addr_t addr)
170{
171 struct in_addr in_addr;
172
173 in_addr.s_addr = addr;
174 return inet_ntoa(in_addr);
175}
176
177/* 169/*
178 * Start the dhcp client daemon, and wait for it to finish 170 * Start the dhcp client daemon, and wait for it to finish
179 * configuring the interface. 171 * configuring the interface.
@@ -242,7 +234,6 @@ int dhcp_do_request(const char *interface,
242 return -1; 234 return -1;
243 } 235 }
244 if (strcmp(prop_value, "ok") == 0) { 236 if (strcmp(prop_value, "ok") == 0) {
245 char dns_prop_name[PROPERTY_KEY_MAX];
246 if (fill_ip_info(interface, ipaddr, gateway, prefixLength, dns, 237 if (fill_ip_info(interface, ipaddr, gateway, prefixLength, dns,
247 server, lease, vendorInfo, domain, mtu) == -1) { 238 server, lease, vendorInfo, domain, mtu) == -1) {
248 return -1; 239 return -1;
diff --git a/libnetutils/dhcpclient.c b/libnetutils/dhcpclient.c
index b58120ec8..700b02f9b 100644
--- a/libnetutils/dhcpclient.c
+++ b/libnetutils/dhcpclient.c
@@ -150,7 +150,7 @@ static const char *dhcp_type_to_name(uint32_t type)
150 150
151void dump_dhcp_info(dhcp_info *info) 151void dump_dhcp_info(dhcp_info *info)
152{ 152{
153 char addr[20], gway[20], mask[20]; 153 char addr[20], gway[20];
154 ALOGD("--- dhcp %s (%d) ---", 154 ALOGD("--- dhcp %s (%d) ---",
155 dhcp_type_to_name(info->type), info->type); 155 dhcp_type_to_name(info->type), info->type);
156 strcpy(addr, ipaddr(info->ipaddr)); 156 strcpy(addr, ipaddr(info->ipaddr));
diff --git a/libnetutils/ifc_utils.c b/libnetutils/ifc_utils.c
index 913f51e81..bfe712193 100644
--- a/libnetutils/ifc_utils.c
+++ b/libnetutils/ifc_utils.c
@@ -421,7 +421,6 @@ int ifc_clear_addresses(const char *name) {
421 421
422int ifc_set_hwaddr(const char *name, const void *ptr) 422int ifc_set_hwaddr(const char *name, const void *ptr)
423{ 423{
424 int r;
425 struct ifreq ifr; 424 struct ifreq ifr;
426 ifc_init_ifr(name, &ifr); 425 ifc_init_ifr(name, &ifr);
427 426
diff --git a/libnetutils/packet.c b/libnetutils/packet.c
index 3cdefb08b..a878dd3a7 100644
--- a/libnetutils/packet.c
+++ b/libnetutils/packet.c
@@ -41,7 +41,7 @@ int fatal();
41 41
42int open_raw_socket(const char *ifname __attribute__((unused)), uint8_t *hwaddr, int if_index) 42int open_raw_socket(const char *ifname __attribute__((unused)), uint8_t *hwaddr, int if_index)
43{ 43{
44 int s, flag; 44 int s;
45 struct sockaddr_ll bindaddr; 45 struct sockaddr_ll bindaddr;
46 46
47 if((s = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP))) < 0) { 47 if((s = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP))) < 0) {