Refactor? Use END_CIRC_REASON_TORPROTOCOL rather than "1" in connection_exit_begin_conn()
In the function comment for connection_exit_begin_conn() we see
* Return -(some circuit end reason) if we want to tear down <b>circ</b>.
* Else return 0.
and then at the front of the function we see
if (rh.length > RELAY_PAYLOAD_SIZE)
return -1;
Now, it happens that 1 is END_CIRC_REASON_TORPROTOCOL, which is a legitimate reason to use in this case. But did we just get lucky?
Later there's also a
if (r < -1) {
return -1;
If we want to go wilder with the change here, I think this function actually only ever returns 0 and -1, so it's not actually following the function comment and we could get rid of that part of it instead?