| @@ -642,7 +642,7 @@ struct json_object* json_object_new_string(const char *s) | |||||
| return jso; | return jso; | ||||
| } | } | ||||
| struct json_object* json_object_new_string_len(const char *s, int len) | |||||
| struct json_object* json_object_new_string_len(const char *s, size_t len) | |||||
| { | { | ||||
| struct json_object *jso = json_object_new(json_type_string); | struct json_object *jso = json_object_new(json_type_string); | ||||
| if(!jso) return NULL; | if(!jso) return NULL; | ||||
| @@ -530,7 +530,7 @@ extern double json_object_get_double(struct json_object *obj); | |||||
| */ | */ | ||||
| extern struct json_object* json_object_new_string(const char *s); | extern struct json_object* json_object_new_string(const char *s); | ||||
| extern struct json_object* json_object_new_string_len(const char *s, int len); | |||||
| extern struct json_object* json_object_new_string_len(const char *s, size_t len); | |||||
| /** Get the string value of a json_object | /** Get the string value of a json_object | ||||
| * | * | ||||
| @@ -242,7 +242,7 @@ int json_parse_int64(const char *buf, int64_t *retval) | |||||
| */ | */ | ||||
| if (orig_has_neg != recheck_has_neg || | if (orig_has_neg != recheck_has_neg || | ||||
| strncmp(buf_sig_digits, buf_cmp_start, strlen(buf_cmp_start)) != 0 || | strncmp(buf_sig_digits, buf_cmp_start, strlen(buf_cmp_start)) != 0 || | ||||
| ((int)strlen(buf_sig_digits) != buf_cmp_len && | |||||
| (strlen(buf_sig_digits) != buf_cmp_len && | |||||
| isdigit((int)buf_sig_digits[buf_cmp_len]) | isdigit((int)buf_sig_digits[buf_cmp_len]) | ||||
| ) | ) | ||||
| ) | ) | ||||
| @@ -88,9 +88,9 @@ size_t printbuf_memappend(struct printbuf *p, const char *buf, size_t size) | |||||
| return size; | return size; | ||||
| } | } | ||||
| int printbuf_memset(struct printbuf *pb, int offset, int charvalue, int len) | |||||
| int printbuf_memset(struct printbuf *pb, size_t offset, int charvalue, int len) | |||||
| { | { | ||||
| int size_needed; | |||||
| size_t size_needed; | |||||
| if (offset == -1) | if (offset == -1) | ||||
| offset = pb->bpos; | offset = pb->bpos; | ||||
| @@ -22,7 +22,7 @@ extern "C" { | |||||
| struct printbuf { | struct printbuf { | ||||
| char *buf; | char *buf; | ||||
| int bpos; | |||||
| size_t bpos; | |||||
| size_t size; | size_t size; | ||||
| }; | }; | ||||
| @@ -59,7 +59,7 @@ do { \ | |||||
| * If offset is -1, this starts at the end of the current data in the buffer. | * If offset is -1, this starts at the end of the current data in the buffer. | ||||
| */ | */ | ||||
| extern int | extern int | ||||
| printbuf_memset(struct printbuf *pb, int offset, int charvalue, int len); | |||||
| printbuf_memset(struct printbuf *pb, size_t offset, int charvalue, int len); | |||||
| extern int | extern int | ||||
| sprintbuf(struct printbuf *p, const char *msg, ...); | sprintbuf(struct printbuf *p, const char *msg, ...); | ||||