Improve error messages

This commit is contained in:
Shahram Najm 2021-12-09 18:53:05 +00:00
parent ac2095cd42
commit 653594028c
1 changed files with 4 additions and 4 deletions

View File

@ -143,7 +143,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len)
{
*val = (double)grib_handle_of_accessor(a)->offset;
*len = 1;
return 0;
return GRIB_SUCCESS;
}
static int unpack_string(grib_accessor* a, char* v, size_t* len)
@ -159,8 +159,8 @@ static int unpack_string(grib_accessor* a, char* v, size_t* len)
l = strlen(repres) + 1;
if (l > *len) {
grib_context_log(a->context, GRIB_LOG_ERROR, "grib_accessor_long : unpack_string : Buffer too small for %s ", a->name);
grib_context_log(a->context, GRIB_LOG_ERROR, "grib_accessor_long : unpack_string : Buffer too small for %s",
a->name);
*len = l;
return GRIB_BUFFER_TOO_SMALL;
}