patch 8.0.1753: various warnings from a static analyser
Problem: Various warnings from a static analyser
Solution: Add type casts, remove unneeded conditions. (Christian Brabandt,
closes #2770)
diff --git a/src/evalfunc.c b/src/evalfunc.c
index 62dc40e..dd4462d 100644
--- a/src/evalfunc.c
+++ b/src/evalfunc.c
@@ -10194,7 +10194,7 @@
}
rettv->vval.v_number = 1; /* FAIL */
- if (line == NULL || lnum < 1 || lnum > curbuf->b_ml.ml_line_count + 1)
+ if (line == NULL || lnum > curbuf->b_ml.ml_line_count + 1)
break;
/* When coming here from Insert mode, sync undo, so that this can be