mirror of https://github.com/ecmwf/eccodes.git
Improve error messages
This commit is contained in:
parent
ac2095cd42
commit
653594028c
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue