|
@@ -458,9 +458,7 @@ circuitmux_clear_policy(circuitmux_t *cmux)
|
|
|
tor_assert(cmux);
|
|
|
|
|
|
|
|
|
- if (cmux->policy) {
|
|
|
- circuitmux_set_policy(cmux, NULL);
|
|
|
- }
|
|
|
+ circuitmux_set_policy(cmux, NULL);
|
|
|
}
|
|
|
|
|
|
|
|
@@ -884,7 +882,7 @@ circuitmux_attach_circuit,(circuitmux_t *cmux, circuit_t *circ,
|
|
|
hashent->muxinfo.cell_count = cell_count;
|
|
|
hashent->muxinfo.direction = direction;
|
|
|
|
|
|
- if (cmux->policy && cmux->policy->alloc_circ_data) {
|
|
|
+ if (cmux->policy->alloc_circ_data) {
|
|
|
|
|
|
tor_assert(cmux->policy->free_circ_data);
|
|
|
|
|
@@ -1085,7 +1083,7 @@ circuitmux_set_num_cells(circuitmux_t *cmux, circuit_t *circ,
|
|
|
cmux->n_cells += n_cells;
|
|
|
|
|
|
|
|
|
- if (cmux->policy && cmux->policy->notify_set_n_cells) {
|
|
|
+ if (cmux->policy->notify_set_n_cells) {
|
|
|
|
|
|
cmux->policy->notify_set_n_cells(cmux,
|
|
|
cmux->policy_data,
|
|
@@ -1210,7 +1208,7 @@ circuitmux_notify_xmit_cells(circuitmux_t *cmux, circuit_t *circ,
|
|
|
* We call notify_xmit_cells() before making the circuit inactive if needed,
|
|
|
* so the policy can always count on this coming in on an active circuit.
|
|
|
*/
|
|
|
- if (cmux->policy && cmux->policy->notify_xmit_cells) {
|
|
|
+ if (cmux->policy->notify_xmit_cells) {
|
|
|
cmux->policy->notify_xmit_cells(cmux, cmux->policy_data, circ,
|
|
|
hashent->muxinfo.policy_data,
|
|
|
n_cells);
|