summaryrefslogtreecommitdiff
path: root/src/raptor_www_curl.c
diff options
context:
space:
mode:
authorDave Beckett <dave@dajobe.org>2011-08-01 23:22:26 -0700
committerDave Beckett <dave@dajobe.org>2011-08-12 08:02:46 -0700
commit7947f413ef309ae2da684ecb0eed9c00501f324c (patch)
tree49c1662a9e7ba9403dcabae07d2869542ee234cf /src/raptor_www_curl.c
parentdc138860e4f4476c5314da1ee1fd88bcc5f03864 (diff)
downloadraptor-7947f413ef309ae2da684ecb0eed9c00501f324c.tar.gz
size_t for len
Diffstat (limited to 'src/raptor_www_curl.c')
-rw-r--r--src/raptor_www_curl.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/raptor_www_curl.c b/src/raptor_www_curl.c
index fa9ca0a4..f8359153 100644
--- a/src/raptor_www_curl.c
+++ b/src/raptor_www_curl.c
@@ -110,7 +110,7 @@ raptor_www_curl_header_callback(void* ptr, size_t size, size_t nmemb,
#define CONTENT_TYPE_LEN 14
if(!raptor_strncasecmp((char*)ptr, "Content-Type: ", CONTENT_TYPE_LEN)) {
- int len = bytes - CONTENT_TYPE_LEN - 2; /* for \r\n */
+ size_t len = bytes - CONTENT_TYPE_LEN - 2; /* for \r\n */
char *type_buffer = RAPTOR_MALLOC(char*, len + 1);
memcpy(type_buffer, (char*)ptr + 14, len);
type_buffer[len]='\0';
@@ -244,7 +244,8 @@ raptor_www_curl_fetch(raptor_www *www)
/* Requires pointer to a long */
if(curl_easy_getinfo(www->curl_handle, CURLINFO_RESPONSE_CODE, &lstatus) == CURLE_OK)
- www->status_code = lstatus;
+ /* CURL status code will always fit in an int */
+ www->status_code = (int)lstatus;
}