summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2009-01-26 12:56:38 +0000
committerRoy Marples <roy@marples.name>2009-01-26 12:56:38 +0000
commit8af75e4fdae7c4ecc4ef4dd961c5b09ee335a416 (patch)
tree13e095f892d1b345f77adb662cb6ae31063f5f7f
parent78a68b70693939736dedf197c67b66911a4726b9 (diff)
downloaddhcpcd-8af75e4fdae7c4ecc4ef4dd961c5b09ee335a416.tar.xz
while -> for
-rw-r--r--dhcp.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/dhcp.c b/dhcp.c
index 4bb47d31..89ca9afb 100644
--- a/dhcp.c
+++ b/dhcp.c
@@ -726,7 +726,7 @@ encode_rfc1035(const char *src, uint8_t *dst)
if (*src == '\0')
return 0;
- while (*src) {
+ for (; *src; src++) {
if (*src == '\0')
break;
if (*src == '.') {
@@ -739,7 +739,6 @@ encode_rfc1035(const char *src, uint8_t *dst)
lp = p++;
} else
*p++ = (uint8_t)*src;
- src++;
}
*lp = p - lp - 1;
*p++ = '\0';