diff options
author | Andreas Gampe <agampe@google.com> | 2014-11-25 18:52:10 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-11-25 18:52:10 +0000 |
commit | c86b167153fb35f89616273335686b74467c8471 (patch) | |
tree | 7ee66fff171fd9f638e2bf6b9da4772e5c5d1323 | |
parent | 4d47f0fcf1145f8dbff3ac130dbc358c5d357ff7 (diff) | |
parent | a4b846f0d3a679b24f9cd92da9705ae0dcd12995 (diff) | |
download | system_core-c86b167153fb35f89616273335686b74467c8471.zip system_core-c86b167153fb35f89616273335686b74467c8471.tar.gz system_core-c86b167153fb35f89616273335686b74467c8471.tar.bz2 |
am a4b846f0: Merge "Libnetutils: Remove unused functions & variables"
* commit 'a4b846f0d3a679b24f9cd92da9705ae0dcd12995':
Libnetutils: Remove unused functions & variables
-rw-r--r-- | libnetutils/dhcp_utils.c | 9 | ||||
-rw-r--r-- | libnetutils/dhcpclient.c | 2 | ||||
-rw-r--r-- | libnetutils/ifc_utils.c | 1 | ||||
-rw-r--r-- | libnetutils/packet.c | 2 |
4 files changed, 2 insertions, 12 deletions
diff --git a/libnetutils/dhcp_utils.c b/libnetutils/dhcp_utils.c index e1df874..0f7c384 100644 --- a/libnetutils/dhcp_utils.c +++ b/libnetutils/dhcp_utils.c @@ -166,14 +166,6 @@ static int fill_ip_info(const char *interface, return 0; } -static const char *ipaddr_to_string(in_addr_t addr) -{ - struct in_addr in_addr; - - in_addr.s_addr = addr; - return inet_ntoa(in_addr); -} - /* * Start the dhcp client daemon, and wait for it to finish * configuring the interface. @@ -242,7 +234,6 @@ int dhcp_do_request(const char *interface, return -1; } if (strcmp(prop_value, "ok") == 0) { - char dns_prop_name[PROPERTY_KEY_MAX]; if (fill_ip_info(interface, ipaddr, gateway, prefixLength, dns, server, lease, vendorInfo, domain, mtu) == -1) { return -1; diff --git a/libnetutils/dhcpclient.c b/libnetutils/dhcpclient.c index b58120e..700b02f 100644 --- a/libnetutils/dhcpclient.c +++ b/libnetutils/dhcpclient.c @@ -150,7 +150,7 @@ static const char *dhcp_type_to_name(uint32_t type) void dump_dhcp_info(dhcp_info *info) { - char addr[20], gway[20], mask[20]; + char addr[20], gway[20]; ALOGD("--- dhcp %s (%d) ---", dhcp_type_to_name(info->type), info->type); strcpy(addr, ipaddr(info->ipaddr)); diff --git a/libnetutils/ifc_utils.c b/libnetutils/ifc_utils.c index 913f51e..bfe7121 100644 --- a/libnetutils/ifc_utils.c +++ b/libnetutils/ifc_utils.c @@ -421,7 +421,6 @@ int ifc_clear_addresses(const char *name) { int ifc_set_hwaddr(const char *name, const void *ptr) { - int r; struct ifreq ifr; ifc_init_ifr(name, &ifr); diff --git a/libnetutils/packet.c b/libnetutils/packet.c index 3cdefb0..a878dd3 100644 --- a/libnetutils/packet.c +++ b/libnetutils/packet.c @@ -41,7 +41,7 @@ int fatal(); int open_raw_socket(const char *ifname __attribute__((unused)), uint8_t *hwaddr, int if_index) { - int s, flag; + int s; struct sockaddr_ll bindaddr; if((s = socket(PF_PACKET, SOCK_DGRAM, htons(ETH_P_IP))) < 0) { |