mirror of https://github.com/ecmwf/eccodes.git
Return correct error code
This commit is contained in:
parent
ccebec07db
commit
c537cc3771
|
@ -205,7 +205,6 @@ static int pack_long(grib_accessor* a, const long* val, size_t* len)
|
|||
if ((ret = grib_get_long_array_internal(grib_handle_of_accessor(a), self->array, ar, &size)) != GRIB_SUCCESS)
|
||||
return ret;
|
||||
|
||||
|
||||
ar[self->element] = *val;
|
||||
|
||||
if ((ret = grib_set_long_array_internal(grib_handle_of_accessor(a), self->array, ar, size)) != GRIB_SUCCESS)
|
||||
|
|
|
@ -233,7 +233,7 @@ static int unpack_double(grib_accessor* a, double* val, size_t* len)
|
|||
|
||||
values = (long*)grib_context_malloc(a->context, rlen * sizeof(long));
|
||||
if (!values)
|
||||
return GRIB_INTERNAL_ERROR;
|
||||
return GRIB_OUT_OF_MEMORY;
|
||||
|
||||
ret = grib_unpack_long(a, values, &rlen);
|
||||
if (ret != GRIB_SUCCESS) {
|
||||
|
|
Loading…
Reference in New Issue