diff options
author | Nick Mathewson <nickm@torproject.org> | 2011-07-07 11:52:13 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2011-07-07 11:52:13 -0400 |
commit | 64c8e8edda5a7f3525a1ab365c4bd72b19212322 (patch) | |
tree | f332a7c68897a39b81976bc9b0392e5e81848013 /src/or/rendservice.c | |
parent | 174cbff8cf855dc1bbf690694f539ba3f85a508c (diff) | |
download | tor-64c8e8edda5a7f3525a1ab365c4bd72b19212322.tar.gz tor-64c8e8edda5a7f3525a1ab365c4bd72b19212322.zip |
Kill redundant checks around routerset_contains_*()
All of the routerset_contains*() functions return 0 if their
routerset_t argument is NULL. Therefore, there's no point in
doing "if (ExcludeNodes && routerset_contains*(ExcludeNodes...))",
for example.
This patch fixes every instance of
if (X && routerstatus_contains*(X,...))
Note that there are other patterns that _aren't_ redundant. For
example, we *don't* want to change:
if (EntryNodes && !routerstatus_contains(EntryNodes,...))
Fixes #2797. No bug here; just needless code.
Diffstat (limited to 'src/or/rendservice.c')
-rw-r--r-- | src/or/rendservice.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index 4413ae9d83..47a9fc7276 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -1079,7 +1079,7 @@ rend_service_introduce(origin_circuit_t *circuit, const uint8_t *request, } /* Check if we'd refuse to talk to this router */ - if (options->ExcludeNodes && options->StrictNodes && + if (options->StrictNodes && routerset_contains_extendinfo(options->ExcludeNodes, extend_info)) { log_warn(LD_REND, "Client asked to rendezvous at a relay that we " "exclude, and StrictNodes is set. Refusing service."); |