Commit 316a9f64 authored by Yang Tse's avatar Yang Tse
Browse files

Compiler warning fix

parent c6de584c
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -319,7 +319,7 @@ CURLcode Curl_readwrite(struct connectdata *conn,
        int readrc;

        if (k->size != -1 && !k->header)
          bytestoread = k->size - k->bytecount;
          bytestoread = (size_t)(k->size - k->bytecount);

        /* receive data from the network! */
        readrc = Curl_read(conn, conn->sockfd, k->buf, bytestoread, &nread);
@@ -1133,7 +1133,8 @@ CURLcode Curl_readwrite(struct connectdata *conn,

          if((-1 != k->maxdownload) &&
             (k->bytecount + nread >= k->maxdownload)) {
            size_t excess = k->bytecount + nread - k->maxdownload;
            size_t excess = (size_t)(k->bytecount + 
                             (curl_off_t)nread - k->maxdownload);

            if (excess > 0) {
                infof(data, "Rewinding stream by : %d bytes\n", excess);