aboutsummaryrefslogtreecommitdiff
path: root/src/common/parse_manifest.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/parse_manifest.c')
-rw-r--r--src/common/parse_manifest.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/common/parse_manifest.c b/src/common/parse_manifest.c
index 373a4f6c00f..612e120b17a 100644
--- a/src/common/parse_manifest.c
+++ b/src/common/parse_manifest.c
@@ -112,7 +112,7 @@ static void json_manifest_finalize_system_identifier(JsonManifestParseState *par
static void json_manifest_finalize_file(JsonManifestParseState *parse);
static void json_manifest_finalize_wal_range(JsonManifestParseState *parse);
static void verify_manifest_checksum(JsonManifestParseState *parse,
- char *buffer, size_t size,
+ const char *buffer, size_t size,
pg_cryptohash_ctx *incr_ctx);
static void json_manifest_parse_failure(JsonManifestParseContext *context,
char *msg);
@@ -183,7 +183,7 @@ json_parse_manifest_incremental_shutdown(JsonManifestParseIncrementalState *incs
void
json_parse_manifest_incremental_chunk(
- JsonManifestParseIncrementalState *incstate, char *chunk, size_t size,
+ JsonManifestParseIncrementalState *incstate, const char *chunk, size_t size,
bool is_last)
{
JsonParseErrorType res,
@@ -206,7 +206,7 @@ json_parse_manifest_incremental_chunk(
if (!is_last)
{
if (pg_cryptohash_update(incstate->manifest_ctx,
- (uint8 *) chunk, size) < 0)
+ (const uint8 *) chunk, size) < 0)
context->error_cb(context, "could not update checksum of manifest");
}
else
@@ -225,7 +225,7 @@ json_parse_manifest_incremental_chunk(
* invoked and is expected not to return.
*/
void
-json_parse_manifest(JsonManifestParseContext *context, char *buffer,
+json_parse_manifest(JsonManifestParseContext *context, const char *buffer,
size_t size)
{
JsonLexContext *lex;
@@ -810,7 +810,7 @@ json_manifest_finalize_wal_range(JsonManifestParseState *parse)
* parse incr_ctx will be NULL.
*/
static void
-verify_manifest_checksum(JsonManifestParseState *parse, char *buffer,
+verify_manifest_checksum(JsonManifestParseState *parse, const char *buffer,
size_t size, pg_cryptohash_ctx *incr_ctx)
{
JsonManifestParseContext *context = parse->context;
@@ -858,7 +858,7 @@ verify_manifest_checksum(JsonManifestParseState *parse, char *buffer,
{
manifest_ctx = incr_ctx;
}
- if (pg_cryptohash_update(manifest_ctx, (uint8 *) buffer, penultimate_newline + 1) < 0)
+ if (pg_cryptohash_update(manifest_ctx, (const uint8 *) buffer, penultimate_newline + 1) < 0)
context->error_cb(context, "could not update checksum of manifest");
if (pg_cryptohash_final(manifest_ctx, manifest_checksum_actual,
sizeof(manifest_checksum_actual)) < 0)