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

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

View File

@@ -1906,6 +1906,7 @@ void ex_listdo(exarg_T *eap)
/* go to window "tp" */ /* go to window "tp" */
if (!valid_tabpage(tp)) if (!valid_tabpage(tp))
break; break;
assert(tp);
goto_tabpage_tp(tp, TRUE, TRUE); goto_tabpage_tp(tp, TRUE, TRUE);
tp = tp->tp_next; tp = tp->tp_next;
} else if (eap->cmdidx == CMD_bufdo) { } else if (eap->cmdidx == CMD_bufdo) {