Add error checking

This commit is contained in:
Shahram Najm 2016-04-25 10:22:55 +01:00
parent 6f42cda9a4
commit a0df26be8d
1 changed files with 6 additions and 7 deletions

View File

@ -406,6 +406,7 @@ static int get_descriptors(grib_accessor* a)
self->canBeMissing[i]=grib_bufr_descriptor_can_be_missing(self->expanded->v[i]);
ret=grib_get_long(h,self->numberOfSubsetsName,&(self->numberOfSubsets));
if (ret != GRIB_SUCCESS) return ret;
ret=grib_get_long(h,self->compressedDataName,&(self->compressedData));
return ret;
@ -1665,7 +1666,6 @@ static int create_keys(grib_accessor* a,long onlySubset,long startSubset,long en
creatorGroup.flags = GRIB_ACCESSOR_FLAG_DUMP;
creatorGroup.set = 0;
if (self->dataAccessors) {
grib_accessors_list_delete(c,self->dataAccessors);
/* grib_empty_section ( c,self->dataKeys ); */
@ -2014,7 +2014,6 @@ static int process_elements(grib_accessor* a,int flag,long onlySubset,long start
self->elementsDescriptorsIndex=grib_viarray_new(c,100,100);
}
numberOfDescriptors=grib_bufr_descriptors_array_used_size(self->expanded);
set_subset_start_end(self,&onlySubset,&startSubset,&endSubset,&start,&end);