mirror of
https://github.com/DaveGamble/cJSON.git
synced 2023-08-10 21:13:26 +03:00
Add more consts to unsigned chars
This commit is contained in:
parent
cf9d57d56c
commit
af6d5d3d7c
4
cJSON.c
4
cJSON.c
@ -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. */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user