Remove duplication
This commit is contained in:
parent
a1bba96ba6
commit
5a892970ed
@ -15,15 +15,6 @@ static int dotted_mask(char *bitmask_string, unsigned char array[])
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static int dotted_mask(char *bitmask_string, unsigned char array[])
|
|
||||||
{
|
|
||||||
unsigned char v4bits[4];
|
|
||||||
if (1 != inet_pton (AF_INET, bitmask_string, v4bits)) return -1;
|
|
||||||
memset (array, 0xff, IPV6_LEN-4);
|
|
||||||
memcpy (array + IPV6_LEN-4, v4bits, 4);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Fills in the netmask array given a numeric value.
|
* Fills in the netmask array given a numeric value.
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user