Return correct error code

This commit is contained in:
Shahram Najm 2021-03-13 14:11:43 +00:00
parent ccebec07db
commit c537cc3771
2 changed files with 1 additions and 2 deletions

View File

@ -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)

View File

@ -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) {