summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorSebastian Hahn <sebastian@torproject.org>2015-02-12 13:59:31 +0100
committerSebastian Hahn <sebastian@torproject.org>2015-02-12 14:54:39 +0100
commit87a95b02363508dd6d9ce4094801c55d3b364ebf (patch)
treea5d52ac0f3e71a3189dbb5c4b2ed68b2426f9f84 /src/test
parent9667b2b88a1f8e9af08704c8bc95b8399a6e4145 (diff)
downloadtor-87a95b02363508dd6d9ce4094801c55d3b364ebf.tar.gz
tor-87a95b02363508dd6d9ce4094801c55d3b364ebf.zip
Actually get all interface addresses
If we guessed a buffer size too small, we never increased the buffer and tried again Also simplify the interface of ifreq_to_smartlist a little
Diffstat (limited to 'src/test')
-rw-r--r--src/test/test_address.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/test/test_address.c b/src/test/test_address.c
index f98cc12b62..c739587045 100644
--- a/src/test/test_address.c
+++ b/src/test/test_address.c
@@ -375,7 +375,7 @@ test_address_ifreq_to_smartlist(void *arg)
ifc->ifc_len = sizeof(struct ifreq);
ifc->ifc_ifcu.ifcu_req = ifr;
- results = ifreq_to_smartlist((struct ifreq *)ifc->ifc_buf,ifc->ifc_len);
+ results = ifreq_to_smartlist(ifc->ifc_buf,ifc->ifc_len);
tt_int_op(smartlist_len(results),==,1);
tor_addr = smartlist_get(results, 0);
@@ -398,7 +398,7 @@ test_address_ifreq_to_smartlist(void *arg)
SMARTLIST_FOREACH(results, tor_addr_t *, t, tor_free(t));
smartlist_free(results);
- results = ifreq_to_smartlist((struct ifreq *)ifc->ifc_buf,ifc->ifc_len);
+ results = ifreq_to_smartlist(ifc->ifc_buf,ifc->ifc_len);
tt_int_op(smartlist_len(results),==,2);
tor_addr = smartlist_get(results, 0);