Fix warnings: ex_cmds2.c: ex_listdo(): Np dereference: FP.

Problem    : Dereference of null pointer @ 1903.
Diagnostic : False positive.
Rationale  : Suggested error path first assumes wp == NULL and later one
             win_valid(wp), which is not possible.
Resolution : Assert wp != NULL if win_valid(wp).
This commit is contained in:
Eliseo Martínez 2015-04-30 10:07:07 +02:00
parent df3abf4df0
commit 21d40475bb

View File

@ -1897,6 +1897,7 @@ void ex_listdo(exarg_T *eap)
/* go to window "wp" */
if (!win_valid(wp))
break;
assert(wp);
win_goto(wp);
if (curwin != wp)
break; /* something must be wrong */