dnsapi: Transform two for loops into while loops.
Michael Stefaniuc
mstefani at redhat.de
Sat Nov 1 18:24:20 CDT 2008
The transformation was trivial as the loop counter variables aren't
used in the loop block.
---
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);
--
1.6.0.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.winehq.org/pipermail/wine-patches/attachments/20081102/13334298/attachment.pgp
More information about the wine-patches
mailing list