1.1 --- a/src/node/ipv4-address.cc Sat Aug 22 15:32:30 2009 -0700
1.2 +++ b/src/node/ipv4-address.cc Sat Aug 22 15:35:15 2009 -0700
1.3 @@ -34,21 +34,23 @@
1.4 AsciiToIpv4Host (char const *address)
1.5 {
1.6 uint32_t host = 0;
1.7 - while (true) {
1.8 - uint8_t byte = 0;
1.9 - while (*address != ASCII_DOT &&
1.10 - *address != 0) {
1.11 - byte *= 10;
1.12 - byte += *address - ASCII_ZERO;
1.13 + while (true)
1.14 + {
1.15 + uint8_t byte = 0;
1.16 + while (*address != ASCII_DOT && *address != 0)
1.17 + {
1.18 + byte *= 10;
1.19 + byte += *address - ASCII_ZERO;
1.20 + address++;
1.21 + }
1.22 + host <<= 8;
1.23 + host |= byte;
1.24 + if (*address == 0)
1.25 + {
1.26 + break;
1.27 + }
1.28 address++;
1.29 }
1.30 - host <<= 8;
1.31 - host |= byte;
1.32 - if (*address == 0) {
1.33 - break;
1.34 - }
1.35 - address++;
1.36 - }
1.37 return host;
1.38 }
1.39