tor_addr_is_internal() is actually used, not is_local_addr().
Whitespace fixes.