change int to size_t

This commit is contained in:
崔一鸣
2018-09-13 20:25:12 +08:00
committed by zhengchao
parent e89ac9d9da
commit c1f8edb75f
3 changed files with 3 additions and 3 deletions

View File

@@ -6,7 +6,7 @@ struct tfe_rpc_response_result{
int status_code; int status_code;
const char* status_msg; const char* status_msg;
char* data; char* data;
int len; size_t len;
}; };
enum TFE_RPC_FLAG enum TFE_RPC_FLAG

View File

@@ -93,7 +93,7 @@ void read_chunk_cb(struct evhttp_request* response, void* arg)
{ {
return; return;
} }
int evbuf_len = evbuffer_get_length(evbuf); size_t evbuf_len = evbuffer_get_length(evbuf);
char* data = (char*)evbuffer_pullup(evbuf, evbuf_len); char* data = (char*)evbuffer_pullup(evbuf, evbuf_len);
//printf("data is %s\n", data==NULL ? "NULL":"NOT NULL"); //printf("data is %s\n", data==NULL ? "NULL":"NOT NULL");
struct tfe_rpc_response_result* result = ALLOC(struct tfe_rpc_response_result, 1); struct tfe_rpc_response_result* result = ALLOC(struct tfe_rpc_response_result, 1);

View File

@@ -352,7 +352,7 @@ static void certstore_rpc_on_succ(void* result, void* user)
int status_code = response->status_code; int status_code = response->status_code;
const char* status_msg = response->status_msg; const char* status_msg = response->status_msg;
char* data = response->data; char* data = response->data;
int len = response->len; size_t len = response->len;
if(status_code == HTTP_OK) if(status_code == HTTP_OK)
{ {
*(data+len) = '\0'; *(data+len) = '\0';