diff --git a/src/eccodes_prototypes.h b/src/eccodes_prototypes.h index ecdd83633..c9032e08e 100644 --- a/src/eccodes_prototypes.h +++ b/src/eccodes_prototypes.h @@ -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); diff --git a/src/grib_handle.cc b/src/grib_handle.cc index be5cdecda..5520c0fc7 100644 --- a/src/grib_handle.cc +++ b/src/grib_handle.cc @@ -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; }