diff --git a/ncgen/genbin.c b/ncgen/genbin.c index e107a50ca..f24db1290 100644 --- a/ncgen/genbin.c +++ b/ncgen/genbin.c @@ -249,13 +249,13 @@ genbin_definespecialattributes(Symbol* var) level = 9; /* default */ else level = special->_FilterParams[0]; - if(level < 0 || level > 9) + if(level > 9) derror("Illegal deflate level"); else { stat = nc_def_var_deflate(var->container->ncid, var->ncid, (special->_Shuffle == 1?1:0), - (level >= 0?1:0), + (level > 0?1:0), level); } } else {