Remove duplication

This commit is contained in:
Markus Moeller 2021-08-31 20:42:35 +01:00
parent a1bba96ba6
commit 5a892970ed

View File

@ -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.
* *