base/json: Sprinkle const.
This commit is contained in:
committed by
Nicolas Williams
parent
a578088705
commit
f494333624
@@ -1230,10 +1230,11 @@ parse_value(struct parse_ctx *ctx)
|
||||
} else if (len >= 4 && memcmp(ctx->p, "null", 4) == 0) {
|
||||
ctx->p += 4;
|
||||
return heim_null_create();
|
||||
} else if (len >= 4 && strncasecmp((char *)ctx->p, "true", 4) == 0) {
|
||||
} else if (len >= 4 && strncasecmp((const char *)ctx->p, "true", 4) == 0) {
|
||||
ctx->p += 4;
|
||||
return heim_bool_create(1);
|
||||
} else if (len >= 5 && strncasecmp((char *)ctx->p, "false", 5) == 0) {
|
||||
} else if (len >= 5 &&
|
||||
strncasecmp((const char *)ctx->p, "false", 5) == 0) {
|
||||
ctx->p += 5;
|
||||
return heim_bool_create(0);
|
||||
}
|
||||
@@ -1266,7 +1267,7 @@ heim_json_create_with_bytes(const void *data, size_t length, size_t max_depth,
|
||||
ctx.lineno = 1;
|
||||
ctx.p = data;
|
||||
ctx.pstart = data;
|
||||
ctx.pend = ((uint8_t *)data) + length;
|
||||
ctx.pend = ((const uint8_t *)data) + length;
|
||||
ctx.error = NULL;
|
||||
ctx.flags = flags;
|
||||
ctx.depth = max_depth;
|
||||
|
||||
Reference in New Issue
Block a user