VESAValidMode: remove duplicate call to VESAGetRec

Found by cppcheck:

src/vesa.c:356:11: style: Redundant initialization for 'pVesa'. The initialized value is overwritten before it is read. [redundantInitialization]
    pVesa = VESAGetRec(pScrn);
          ^
src/vesa.c:350:19: note: pVesa is initialized
    VESAPtr pVesa = VESAGetRec(pScrn);
                  ^
src/vesa.c:356:11: note: pVesa is overwritten
    pVesa = VESAGetRec(pScrn);
          ^

Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
This commit is contained in:
Alan Coopersmith
2022-10-17 11:48:57 -07:00
parent 2f2436b4fe
commit e285658e60

View File

@@ -353,8 +353,6 @@ VESAValidMode(SCRN_ARG_TYPE arg, DisplayModePtr p, Bool flag, int pass)
DisplayModePtr mode;
float v;
pVesa = VESAGetRec(pScrn);
if (pass != MODECHECK_FINAL) {
if (!warned) {
xf86DrvMsg(pScrn->scrnIndex, X_WARNING, "VESAValidMode called unexpectedly\n");