Removed .- from sanity check, not needed

This commit is contained in:
Jack-Benny Persson 2020-09-26 07:45:13 +02:00
parent 73b9e160b2
commit 6f21b1b08f

View File

@ -60,7 +60,7 @@ int checkInput(char input[])
{
int netmask;
/* Sanity check the user input */
if( strspn(input, "0123456789.-\n") == strlen(input) )
if( strspn(input, "0123456789\n") == strlen(input) )
{
netmask = atoi(input);
if (netmask >= 0 && netmask <= 32)
@ -111,4 +111,5 @@ void printHelp(char progname[])
printf("Optionally, a netmask can be supplied as a "
"argument.\n");
printf("Examle: %s 24\n", progname);
}
}