aboutsummaryrefslogtreecommitdiff
path: root/src/or
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2004-10-12 16:02:15 +0000
committerNick Mathewson <nickm@torproject.org>2004-10-12 16:02:15 +0000
commita91fc48b39b13768dc9069921f2d7e41456debfa (patch)
treeab0ab48d56f74d22ce73baa4453bb03712789bcc /src/or
parent0068415b800ef78fb75466f5c36544db6686a76a (diff)
downloadtor-a91fc48b39b13768dc9069921f2d7e41456debfa.tar.gz
tor-a91fc48b39b13768dc9069921f2d7e41456debfa.zip
Note byte-order on result for parse_addr_port()
svn:r2444
Diffstat (limited to 'src/or')
-rw-r--r--src/or/test.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/or/test.c b/src/or/test.c
index 4d74651edc..6a13a9db6c 100644
--- a/src/or/test.c
+++ b/src/or/test.c
@@ -640,12 +640,12 @@ test_util() {
cp = NULL; u32 = 3; u16 = 3;
test_assert(!parse_addr_port("1.2.3.4", &cp, &u32, &u16));
test_streq(cp, "1.2.3.4");
- test_eq(u32, 0x01020304u);
+ test_eq(u32, htonl(0x01020304u));
test_eq(u16, 0);
tor_free(cp);
test_assert(!parse_addr_port("4.3.2.1:99", &cp, &u32, &u16));
test_streq(cp, "4.3.2.1");
- test_eq(u32, 0x04030201u);
+ test_eq(u32, htonl(0x04030201u));
test_eq(u16, 99);
tor_free(cp);
test_assert(!parse_addr_port("nonexistent.address:4040", &cp, NULL, &u16));
@@ -654,7 +654,7 @@ test_util() {
tor_free(cp);
test_assert(!parse_addr_port("localhost:9999", &cp, &u32, &u16));
test_streq(cp, "localhost");
- test_eq(u32, 0x7f000001u);
+ test_eq(u32, htonl(0x7f000001u));
test_eq(u16, 9999);
tor_free(cp);
u32 = 3;