Skip to content

Commit

Permalink
cleanup: Mark input pointer type for cmp_strerror as const.
Browse files Browse the repository at this point in the history
Its members are never mutated.
  • Loading branch information
iphydf committed May 1, 2024
1 parent 3d5f2d1 commit 45df2af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,7 @@ uint32_t cmp_mp_version(void) {
return cmp_mp_version_;
}

const char* cmp_strerror(cmp_ctx_t *ctx) {
const char* cmp_strerror(const cmp_ctx_t *ctx) {
if (ctx->error > CMP_ERROR_NONE && ctx->error < CMP_ERROR_MAX)
return cmp_error_message((cmp_error_t)ctx->error);

Expand Down
2 changes: 1 addition & 1 deletion cmp.h
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ uint32_t cmp_version(void);
uint32_t cmp_mp_version(void);

/* Returns a string description of a CMP context's error */
const char* cmp_strerror(cmp_ctx_t *ctx);
const char* cmp_strerror(const cmp_ctx_t *ctx);

/* Writes a signed integer to the backend */
bool cmp_write_integer(cmp_ctx_t *ctx, int64_t d);
Expand Down

0 comments on commit 45df2af

Please sign in to comment.