Remove checks for array existence. (CID 410..415)
commit5e4d53d535a3cc9903250b3df0caa829f1c5e4bf
authorNick Mathewson <nickm@torproject.org>
Tue, 27 Oct 2009 01:59:34 +0000 (26 21:59 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 27 Oct 2009 02:40:41 +0000 (26 22:40 -0400)
treedcbab7d722ce4d818f6666365ac3d6aecdf9df24
parentcec698d29ed51ed219f907e12538e6945e535e4a
Remove checks for array existence. (CID 410..415)

In C, the code "char x[10]; if (x) {...}" always takes the true branch of
the if statement.  Coverity notices this now.

In some cases, we were testing arrays to make sure that an operation
we wanted to do would suceed.  Those cases are now always-true.

In some cases, we were testing arrays to see if something was _set_.
Those caes are now tests for strlen(s), or tests for
!tor_mem_is_zero(d,len).
src/common/crypto.c
src/or/circuitbuild.c
src/or/connection.c
src/or/control.c
src/or/rendcommon.c