diff --git a/src/grib_expression_class_logical_and.cc b/src/grib_expression_class_logical_and.cc index 9a25e54c1..902119a5e 100644 --- a/src/grib_expression_class_logical_and.cc +++ b/src/grib_expression_class_logical_and.cc @@ -82,7 +82,6 @@ static int evaluate_long(grib_expression* g, grib_handle* h, long* lres) int ret; grib_expression_logical_and* e = (grib_expression_logical_and*)g; - switch (grib_expression_native_type(h, e->left)) { case GRIB_TYPE_LONG: ret = grib_expression_evaluate_long(h, e->left, &v1); @@ -129,11 +128,8 @@ static int evaluate_long(grib_expression* g, grib_handle* h, long* lres) static int evaluate_double(grib_expression* g, grib_handle* h, double* dres) { long lres = 0; - int ret = 0; - - ret = evaluate_long(g, h, &lres); + int ret = evaluate_long(g, h, &lres); *dres = (double)lres; - return ret; } diff --git a/src/grib_expression_class_logical_or.cc b/src/grib_expression_class_logical_or.cc index ce5e4d765..772a73d8a 100644 --- a/src/grib_expression_class_logical_or.cc +++ b/src/grib_expression_class_logical_or.cc @@ -129,10 +129,8 @@ static int evaluate_long(grib_expression* g, grib_handle* h, long* lres) static int evaluate_double(grib_expression* g, grib_handle* h, double* dres) { long lres = 0; - int ret = evaluate_long(g, h, &lres); *dres = (double)lres; - return ret; } @@ -141,7 +139,7 @@ static void print(grib_context* c, grib_expression* g, grib_handle* f) grib_expression_logical_or* e = (grib_expression_logical_or*)g; printf("("); grib_expression_print(c, e->left, f); - printf(" && "); + printf(" || "); grib_expression_print(c, e->right, f); printf(")"); }