[tor-commits] [tor/master] Fix: check r < 0 before checking errno