diff options
author | Nick Mathewson <nickm@torproject.org> | 2009-09-01 15:41:38 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2009-09-01 15:41:38 -0400 |
commit | 2f0184ece11d6663cb2dd4e161e29dd8861a20af (patch) | |
tree | b414b2246e08aeae44d6b123ad54bb2020ef3797 /src | |
parent | aea9cf1011cf3c7badfd1bc49f0a27f96f234cf9 (diff) | |
download | tor-2f0184ece11d6663cb2dd4e161e29dd8861a20af.tar.gz tor-2f0184ece11d6663cb2dd4e161e29dd8861a20af.zip |
Use a simpler fix for the byte-reversing warning
Diffstat (limited to 'src')
-rw-r--r-- | src/common/address.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/common/address.c b/src/common/address.c index 88cbbb7470..3e0ea25d90 100644 --- a/src/common/address.c +++ b/src/common/address.c @@ -373,10 +373,11 @@ tor_addr_parse_reverse_lookup_name(tor_addr_t *result, const char *address, return -1; /* malformed. */ /* reverse the bytes */ - inaddr.s_addr = (((inaddr.s_addr & (uint32_t)0x000000fful) << 24) - |((inaddr.s_addr & (uint32_t)0x0000ff00ul) << 8) - |((inaddr.s_addr & (uint32_t)0x00ff0000ul) >> 8) - |((inaddr.s_addr & (uint32_t)0xff000000ul) >> 24)); + inaddr.s_addr = (uint32_t) + (((inaddr.s_addr & 0x000000fful) << 24) + |((inaddr.s_addr & 0x0000ff00ul) << 8) + |((inaddr.s_addr & 0x00ff0000ul) >> 8) + |((inaddr.s_addr & 0xff000000ul) >> 24)); if (result) { tor_addr_from_in(result, &inaddr); |