-
- Downloads
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).
Showing
- src/common/crypto.c 0 additions, 3 deletionssrc/common/crypto.c
- src/or/circuitbuild.c 2 additions, 3 deletionssrc/or/circuitbuild.c
- src/or/connection.c 1 addition, 1 deletionsrc/or/connection.c
- src/or/control.c 1 addition, 1 deletionsrc/or/control.c
- src/or/rendcommon.c 2 additions, 1 deletionsrc/or/rendcommon.c
Loading
Please register or sign in to comment