dnsapi: Transform two for loops into while loops.
This commit is contained in:
parent
892f735930
commit
42c733cd3b
|
@ -103,7 +103,7 @@ dns_ns_name_ntop(const u_char *src, char *dst, size_t dstsiz) {
|
|||
if (dn + n >= eom) {
|
||||
return (-1);
|
||||
}
|
||||
for ((void)NULL; n > 0; n--) {
|
||||
while (n-- > 0) {
|
||||
c = *cp++;
|
||||
if (special(c)) {
|
||||
if (dn + 1 >= eom) {
|
||||
|
|
|
@ -74,7 +74,7 @@ static int
|
|||
dns_ns_skiprr(const u_char *ptr, const u_char *eom, ns_sect section, int count) {
|
||||
const u_char *optr = ptr;
|
||||
|
||||
for ((void)NULL; count > 0; count--) {
|
||||
while (count-- > 0) {
|
||||
int b, rdlength;
|
||||
|
||||
b = dn_skipname(ptr, eom);
|
||||
|
|
Loading…
Reference in New Issue