Const correctness

This commit is contained in:
Shahram Najm 2023-11-08 15:05:39 +00:00
parent 7a83e3c1b8
commit f78d164670
2 changed files with 4 additions and 6 deletions

View File

@ -994,7 +994,7 @@ int codes_check_message_header(const void* bytes, size_t length, ProductKind pro
int codes_check_message_footer(const void* bytes, size_t length, ProductKind product);
int grib_get_message_size(const grib_handle* h, size_t* size);
int grib_get_message(const grib_handle* h, const void** msg, size_t* size);
int grib_get_message_headers(grib_handle* h, const void** msg, size_t* size);
int grib_get_message_headers(const grib_handle* h, const void** msg, size_t* size);
grib_action* grib_action_from_filter(const char* filter);
int grib_handle_apply_action(grib_handle* h, grib_action* a);
void grib_multi_support_reset_file(grib_context* c, FILE* f);

View File

@ -1149,9 +1149,7 @@ grib_multi_handle* grib_multi_handle_new(grib_context* c)
}
h = (grib_multi_handle*)grib_context_malloc_clear(c, sizeof(grib_multi_handle));
if (h == NULL) {
grib_context_log(c, GRIB_LOG_ERROR,
"grib_multi_handle_new: unable to allocate memory. %s",
grib_get_error_message(GRIB_OUT_OF_MEMORY));
grib_context_log(c, GRIB_LOG_ERROR, "%s: Unable to allocate memory", __func__);
return NULL;
}
h->buffer = grib_create_growable_buffer(c);
@ -1375,7 +1373,7 @@ int grib_get_message(const grib_handle* ch, const void** msg, size_t* size)
return 0;
}
int grib_get_message_headers(grib_handle* h, const void** msg, size_t* size)
int grib_get_message_headers(const grib_handle* h, const void** msg, size_t* size)
{
int err = 0;
size_t endOfHeadersMarker;
@ -1384,7 +1382,7 @@ int grib_get_message_headers(grib_handle* h, const void** msg, size_t* size)
if ((err = grib_get_offset(h, "endOfHeadersMarker", &endOfHeadersMarker)) != GRIB_SUCCESS) {
grib_context_log(h->context, GRIB_LOG_ERROR,
"grib_get_message_headers: unable to get offset of endOfHeadersMarker");
"%s: Unable to get offset of endOfHeadersMarker", __func__);
return err;
}