提交 af6d5d3d 编写于 作者: M Max Bruckner

Add more consts to unsigned chars

上级 cf9d57d5
...@@ -322,14 +322,14 @@ static unsigned char* ensure(printbuffer *p, size_t needed) ...@@ -322,14 +322,14 @@ static unsigned char* ensure(printbuffer *p, size_t needed)
/* calculate the new length of the string in a printbuffer */ /* calculate the new length of the string in a printbuffer */
static size_t update(const printbuffer *p) static size_t update(const printbuffer *p)
{ {
unsigned char *str = NULL; const unsigned char *str = NULL;
if (!p || !p->buffer) if (!p || !p->buffer)
{ {
return 0; return 0;
} }
str = p->buffer + p->offset; str = p->buffer + p->offset;
return p->offset + strlen((char*)str); return p->offset + strlen((const char*)str);
} }
/* Render the number nicely from the given item into a string. */ /* Render the number nicely from the given item into a string. */
...@@ -510,7 +510,7 @@ static const unsigned char firstByteMark[7] = ...@@ -510,7 +510,7 @@ static const unsigned char firstByteMark[7] =
static const unsigned char *parse_string(cJSON *item, const unsigned char *str, const unsigned char **ep) static const unsigned char *parse_string(cJSON *item, const unsigned char *str, const unsigned char **ep)
{ {
const unsigned char *ptr = str + 1; const unsigned char *ptr = str + 1;
const unsigned char *end_ptr =str + 1; const unsigned char *end_ptr = str + 1;
unsigned char *ptr2 = NULL; unsigned char *ptr2 = NULL;
unsigned char *out = NULL; unsigned char *out = NULL;
size_t len = 0; size_t len = 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册