summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2009-09-01 15:51:09 -0400
committerNick Mathewson <nickm@torproject.org>2009-09-01 15:51:09 -0400
commitbddda9bbdb047e52652f7c6f9c2047df15a4e08e (patch)
tree1ec1b37e01db9967f76db2c1b4291c5190c53796 /src/common
parent2f0184ece11d6663cb2dd4e161e29dd8861a20af (diff)
downloadtor-bddda9bbdb047e52652f7c6f9c2047df15a4e08e.tar.gz
tor-bddda9bbdb047e52652f7c6f9c2047df15a4e08e.zip
Use an _actual_ fix for the byte-reverse warning.
(Given that we're pretty much assuming that int is 32 bits, and given that hex values are always unsigned, taking out the "ul" from 0xff000000 should be fine.)
Diffstat (limited to 'src/common')
-rw-r--r--src/common/address.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/common/address.c b/src/common/address.c
index 3e0ea25d90..2fe013a2cd 100644
--- a/src/common/address.c
+++ b/src/common/address.c
@@ -374,10 +374,10 @@ tor_addr_parse_reverse_lookup_name(tor_addr_t *result, const char *address,
/* reverse the bytes */
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));
+ (((inaddr.s_addr & 0x000000ff) << 24)
+ |((inaddr.s_addr & 0x0000ff00) << 8)
+ |((inaddr.s_addr & 0x00ff0000) >> 8)
+ |((inaddr.s_addr & 0xff000000) >> 24));
if (result) {
tor_addr_from_in(result, &inaddr);