Cosmetics

This commit is contained in:
shahramn 2024-08-10 20:25:07 +01:00
parent 5fa6a7452d
commit a210b14ec6
3 changed files with 10 additions and 12 deletions

View File

@ -91,18 +91,17 @@ grib_action* grib_action_create_close(grib_context* context, char* filename)
static int execute(grib_action* act, grib_handle* h)
{
char filename[2048] = {0,};
size_t len = 2048;
grib_action_close* self = (grib_action_close*)act;
int err = 0;
grib_file* file = 0;
err = grib_get_string(h, self->filename, filename, &len);
char filename[2048] = {0,};
size_t len = sizeof(filename);
int err = grib_get_string(h, self->filename, filename, &len);
/* fprintf(stderr,"++++ name %s\n",filename); */
if (err)
return err;
/* grib_file_close(filename,1,&err); */
file = grib_get_file(filename, &err);
grib_file* file = grib_get_file(filename, &err);
if (err)
return err;
if (file)

View File

@ -317,10 +317,10 @@ static grib_concept_value* get_concept(grib_handle* h, grib_action_concept* self
static int concept_condition_expression_true(grib_handle* h, grib_concept_condition* c, char* exprVal)
{
long lval;
long lres = 0;
int ok = 0;
int err = 0;
long lval = 0;
long lres = 0;
int ok = 0;
int err = 0;
const int type = grib_expression_native_type(h, c->expression);
switch (type) {

View File

@ -231,7 +231,6 @@ static grib_hash_array_value* get_hash_array_impl(grib_handle* h, grib_action* a
char key[4096] = {0,};
char* full = 0;
int id;
int err;
grib_action_hash_array* self = (grib_action_hash_array*)a;
grib_context* context = ((grib_action*)self)->context;
@ -245,7 +244,7 @@ static grib_hash_array_value* get_hash_array_impl(grib_handle* h, grib_action* a
snprintf(buf, 4096, "%s/%s", masterDir, self->basename);
err = grib_recompose_name(h, NULL, buf, master, 1);
int err = grib_recompose_name(h, NULL, buf, master, 1);
if (err) {
grib_context_log(context, GRIB_LOG_ERROR,
"unable to build name of directory %s", self->masterDir);