Skip to content
  1. May 01, 2017
  2. Apr 30, 2017
  3. Apr 29, 2017
  4. Apr 27, 2017
  5. Apr 26, 2017
  6. Apr 25, 2017
  7. Apr 24, 2017
  8. Apr 23, 2017
  9. Apr 22, 2017
    • Alan Jenkins's avatar
      multi: clarify condition in curl_multi_wait · be299a4d
      Alan Jenkins authored
      `if(nfds || extra_nfds) {` is followed by `malloc(nfds * ...)`.
      
      If `extra_fs` could be non-zero when `nfds` was zero, then we have
      `malloc(0)` which is allowed to return `NULL`. But, malloc returning
      NULL can be confusing. In this code, the next line would treat the NULL
      as an allocation failure.
      
      It turns out, if `nfds` is zero then `extra_nfds` must also be zero.
      The final value of `nfds` includes `extra_nfds`.  So the test for
      `extra_nfds` is redundant.  It can only confuse the reader.
      
      Closes #1439
      be299a4d