]> granicus.if.org Git - curl/commitdiff
tool_wrte_cb: remove check for config == NULL
authorDaniel Stenberg <daniel@haxx.se>
Sat, 17 Jun 2017 21:58:03 +0000 (23:58 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 17 Jun 2017 21:58:03 +0000 (23:58 +0200)
... as it really cannot have reached this far with config being NULL,
thus this is unnecesary and misleading.

Bug: https://news.ycombinator.com/item?id=14577585 and
https://daniel.haxx.se/blog/2017/06/17/curl-doesnt-spew-binary-anymore/comment-page-1/#comment-18356

Forwarded-to-us-by: Jakub Wilk
src/tool_cb_wrt.c

index c818abf51af9db76112fda24c9f8424e748b7825..ea52469b0ae8f0b975b0f4b07189457393e1b2f1 100644 (file)
@@ -88,9 +88,6 @@ size_t tool_write_cb(char *buffer, size_t sz, size_t nmemb, void *userdata)
    */
   const size_t failure = bytes ? 0 : 1;
 
-  if(!config)
-    return failure;
-
 #ifdef DEBUGBUILD
   {
     char *tty = curlx_getenv("CURL_ISATTY");