Michael Stefaniuc : dnsapi: Transform two for loops into while loops.

Alexandre Julliard julliard at winehq.org
Mon Nov 3 09:06:57 CST 2008


Module: wine
Branch: master
Commit: 42c733cd3b74631ae6966ef539fb3ca00f44f1a4
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=42c733cd3b74631ae6966ef539fb3ca00f44f1a4

Author: Michael Stefaniuc <mstefani at redhat.de>
Date:   Sun Nov  2 00:24:20 2008 +0100

dnsapi: Transform two for loops into while loops.

---

 dlls/dnsapi/ns_name.c  |    2 +-
 dlls/dnsapi/ns_parse.c |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/dnsapi/ns_name.c b/dlls/dnsapi/ns_name.c
index 4bb3e4a..9822578 100644
--- a/dlls/dnsapi/ns_name.c
+++ b/dlls/dnsapi/ns_name.c
@@ -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) {
diff --git a/dlls/dnsapi/ns_parse.c b/dlls/dnsapi/ns_parse.c
index b5884bf..cb9aa62 100644
--- a/dlls/dnsapi/ns_parse.c
+++ b/dlls/dnsapi/ns_parse.c
@@ -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);




More information about the wine-cvs mailing list