]> granicus.if.org Git - curl/commitdiff
url: remove unncessary NULL-check
authorDaniel Stenberg <daniel@haxx.se>
Mon, 6 Nov 2017 07:21:30 +0000 (08:21 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 6 Nov 2017 07:23:11 +0000 (08:23 +0100)
Since 'conn' won't be NULL in there and we also access the pointer in
there without the check.

Coverity CID 1420610

lib/url.c

index aeb0c9027bec06cf367e0eaef692411c9db891a0..169eecf71388746deb1bc619627bfe5ed91fa18e 100644 (file)
--- a/lib/url.c
+++ b/lib/url.c
@@ -7221,9 +7221,8 @@ CURLcode Curl_init_do(struct Curl_easy *data, struct connectdata *conn)
 {
   struct SingleRequest *k = &data->req;
 
-  if(conn)
-    conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to
-                                 * use */
+  conn->bits.do_more = FALSE; /* by default there's no curl_do_more() to
+                                 use */
 
   data->state.done = FALSE; /* *_done() is not called yet */
   data->state.expect100header = FALSE;