]> granicus.if.org Git - curl/commitdiff
lib: eliminate some dead code
authorKamil Dudka <kdudka@redhat.com>
Wed, 2 Jun 2010 21:11:59 +0000 (23:11 +0200)
committerKamil Dudka <kdudka@redhat.com>
Wed, 2 Jun 2010 21:50:38 +0000 (23:50 +0200)
lib/multi.c
lib/transfer.c

index 06ffbd7b17d67fa5460ec3d9a8a7881a67396640..9abf339b1573fa423ec7a4e6a6447bf660e9deaf 100644 (file)
@@ -1793,11 +1793,12 @@ static void singlesocket(struct Curl_multi *multi,
         return;
     }
 
+    /* we know (entry != NULL) at this point, see the logic above */
     multi->socket_cb(easy->easy_handle,
                      s,
                      action,
                      multi->socket_userp,
-                     entry ? entry->socketp : NULL);
+                     entry->socketp);
 
     entry->action = action; /* store the current action state */
   }
index c466e8716193cc3233f22a8cc07964b6f20ed68d..191d3dc192548bfd0c326cb5e987f457c83c62ce 100644 (file)
@@ -2057,13 +2057,12 @@ static CURLcode Curl_do_perform(struct SessionHandle *data)
           if(rc)
             res = rc;
           else
-            retry = (bool)(newurl?TRUE:FALSE);
+            retry = (newurl?TRUE:FALSE);
 
           if(retry) {
+            /* we know (newurl != NULL) at this point */
             res = CURLE_OK;
             follow = FOLLOW_RETRY;
-            if (!newurl)
-              res = CURLE_OUT_OF_MEMORY;
           }
           else if (res == CURLE_OK) {
             /*