Fix broken test

This commit is contained in:
shahramn 2024-03-06 16:31:23 +00:00
parent 79f51dd0a4
commit 2aba61bbae
1 changed files with 4 additions and 2 deletions

View File

@ -2103,12 +2103,13 @@ int grib_f_index_get_string_(int* index_id, char* key, char* val, int *eachsize,
/*****************************************************************************/ /*****************************************************************************/
int grib_f_index_get_long_(int* index_id, char* key, long *val, int* size, int len) int grib_f_index_get_long_(int* index_id, char* key, long *val, int* size, int len)
{ {
int err = 0;
grib_index* h = get_index(*index_id); grib_index* h = get_index(*index_id);
char buf[1024]; char buf[1024];
size_t lsize = *size; size_t lsize = *size;
if (!h) return GRIB_INVALID_GRIB; if (!h) return GRIB_INVALID_GRIB;
int err = grib_index_get_long(h, cast_char(buf,key,len), val, &lsize); err = grib_index_get_long(h, cast_char(buf,key,len), val, &lsize);
*size = lsize; *size = lsize;
return err; return err;
} }
@ -2138,12 +2139,13 @@ int grib_f_index_get_int_(int* index_id, char* key, int *val, int* size, int len
/*****************************************************************************/ /*****************************************************************************/
int grib_f_index_get_real8_(int* index_id, char* key, double *val, int* size, int len) int grib_f_index_get_real8_(int* index_id, char* key, double *val, int* size, int len)
{ {
int err = 0;
grib_index* h = get_index(*index_id); grib_index* h = get_index(*index_id);
char buf[1024]; char buf[1024];
size_t lsize = *size; size_t lsize = *size;
if (!h) return GRIB_INVALID_GRIB; if (!h) return GRIB_INVALID_GRIB;
int err = grib_index_get_double(h, cast_char(buf,key,len), val, &lsize); err = grib_index_get_double(h, cast_char(buf,key,len), val, &lsize);
*size = lsize; *size = lsize;
return err; return err;
} }