Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a4b846f0 authored by Andreas Gampe's avatar Andreas Gampe Committed by Gerrit Code Review
Browse files

Merge "Libnetutils: Remove unused functions & variables"

parents 1fc78d3d a5d5d847
Loading
Loading
Loading
Loading
+0 −9
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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));
+0 −1
Original line number Diff line number Diff line
@@ -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);

+1 −1
Original line number Diff line number Diff line
@@ -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) {