dnsapi: Transform two for loops into while loops.

This commit is contained in:
Michael Stefaniuc 2008-11-02 00:24:20 +01:00 committed by Alexandre Julliard
parent 892f735930
commit 42c733cd3b
2 changed files with 2 additions and 2 deletions

View File

@ -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) {

View File

@ -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);