Small cleanups to test_entry_is_time_to_retry

This commit is contained in:
Nick Mathewson 2014-08-20 15:31:25 -04:00
parent 8b539cc276
commit a5fe84b5a6

View File

@ -541,16 +541,14 @@ test_entry_guards_set_from_config(void *arg)
static void
test_entry_is_time_to_retry(void *arg)
{
(void)arg;
entry_guard_t *test_guard;
time_t now;
int retval;
(void)arg;
now = time(NULL);
test_guard = tor_malloc(sizeof(entry_guard_t));
memset(test_guard,0,sizeof(entry_guard_t));
test_guard = tor_malloc_zero(sizeof(entry_guard_t));
test_guard->last_attempted = now - 10;
test_guard->unreachable_since = now - 1;
@ -612,7 +610,6 @@ test_entry_is_time_to_retry(void *arg)
done:
tor_free(test_guard);
return;
}
/** XXX Do some tests that entry_is_live() */