commit 5690284559af012c279e9b989497ccc2e03cfc70 Author: Nick Mathewson nickm@torproject.org Date: Wed Jul 16 16:52:16 2014 +0200
Fix wide lines, make entry_is_live() non-inline --- src/or/entrynodes.c | 5 +++-- src/or/entrynodes.h | 6 +++--- src/test/test_entrynodes.c | 4 +++- 3 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/or/entrynodes.c b/src/or/entrynodes.c index 65a3ae3..4d09195 100644 --- a/src/or/entrynodes.c +++ b/src/or/entrynodes.c @@ -190,8 +190,9 @@ entry_is_time_to_retry(const entry_guard_t *e, time_t now) * If need_descriptor is true, only return the node if we currently have * a descriptor (routerinfo or microdesc) for it. */ -STATIC INLINE const node_t * -entry_is_live(const entry_guard_t *e, entry_is_live_flags_t flags, const char **msg) +STATIC const node_t * +entry_is_live(const entry_guard_t *e, entry_is_live_flags_t flags, + const char **msg) { const node_t *node; const or_options_t *options = get_options(); diff --git a/src/or/entrynodes.h b/src/or/entrynodes.h index 81f8b9c..5d91756 100644 --- a/src/or/entrynodes.h +++ b/src/or/entrynodes.h @@ -101,9 +101,9 @@ typedef enum { ENTRY_NEED_DESCRIPTOR = 1<<3, } entry_is_live_flags_t;
-STATIC INLINE const node_t *entry_is_live(const entry_guard_t *e, - entry_is_live_flags_t flags, - const char **msg); +STATIC const node_t *entry_is_live(const entry_guard_t *e, + entry_is_live_flags_t flags, + const char **msg); #endif
void remove_all_entry_guards(void); diff --git a/src/test/test_entrynodes.c b/src/test/test_entrynodes.c index 47d8bc3..1be0ce1 100644 --- a/src/test/test_entrynodes.c +++ b/src/test/test_entrynodes.c @@ -553,6 +553,7 @@ test_entry_is_live(void *arg) const node_t *test_node = NULL; const entry_guard_t *test_entry = NULL; const char *msg; + int which_node;
(void) arg;
@@ -576,7 +577,8 @@ test_entry_is_live(void *arg) tt_int_op(smartlist_len(all_entry_guards), ==, NUMBER_OF_DESCRIPTORS);
/* Now get a random test entry that we will use for this unit test. */ - test_entry = smartlist_get(all_entry_guards, 3); /* chosen by fair dice roll */ + which_node = 3; /* (chosen by fair dice roll) */ + test_entry = smartlist_get(all_entry_guards, which_node);
/* Let's do some entry_is_live() tests! */