Skip to content
  • Nick Mathewson's avatar
    Remove checks for array existence. (CID 410..415) · 5e4d53d5
    Nick Mathewson authored
    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).
    5e4d53d5