Move increment of octets
This commit is contained in:
parent
637256206f
commit
e34aef9981
1 changed files with 2 additions and 3 deletions
|
@ -35,14 +35,13 @@ isinetaddr4(const char *str)
|
||||||
digits++;
|
digits++;
|
||||||
if (!in_range(buf)) {
|
if (!in_range(buf)) {
|
||||||
return 0;
|
return 0;
|
||||||
|
} else if (str[l-1] == SEP) {
|
||||||
|
octets++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
if (str[l-1] == SEP) {
|
|
||||||
octets++;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return octets == MAX_OCTETS && digits <= MAX_DIGITLEN;
|
return octets == MAX_OCTETS && digits <= MAX_DIGITLEN;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue