Merge "Libnetutils: Remove unused functions & variables"

This commit is contained in:
Andreas Gampe 2014-11-24 19:37:30 +00:00 committed by Gerrit Code Review
commit a4b846f0d3
4 changed files with 2 additions and 12 deletions

View file

@ -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;

View file

@ -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));

View file

@ -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);

View file

@ -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) {