]> granicus.if.org Git - curl/commitdiff
Compiler warning fix
authorYang Tse <yangsita@gmail.com>
Fri, 27 Oct 2006 02:18:29 +0000 (02:18 +0000)
committerYang Tse <yangsita@gmail.com>
Fri, 27 Oct 2006 02:18:29 +0000 (02:18 +0000)
lib/socks.c

index fb6f7fe25bd7e740be1210742db676ce5401dcac..3319e697e06232755ead57b56d7b2cc40d8dd6d7 100644 (file)
@@ -71,25 +71,29 @@ static int blockread_all(struct connectdata *conn, /* connection data */
     conntime = Curl_tvdiff(tvnow, conn->created);
     if(conntime > conn_timeout) {
       /* we already got the timeout */
-      return -1;
+      result = ~CURLE_OK;
+      break;
     }
     if(Curl_select(sockfd, CURL_SOCKET_BAD,
                    (int)(conn_timeout - conntime)) <= 0) {
-      return -1;
+      result = ~CURLE_OK;
+      break;
     }
     result = Curl_read(conn, sockfd, buf, buffersize, &nread);
     if(result)
-      return result;
+      break;
 
     if(buffersize == nread) {
       allread += nread;
       *n = allread;
-      return CURLE_OK;
+      result = CURLE_OK;
+      break;
     }
     buffersize -= nread;
     buf += nread;
     allread += nread;
   } while(1);
+  return result;
 }
 
 /*