]> git.proxmox.com Git - mirror_edk2.git/commit
MdeModulePkg/DisplayEngine: Remove useless NULL ptr check for NewPos
authorDandan Bi <dandan.bi@intel.com>
Wed, 7 Nov 2018 08:14:22 +0000 (16:14 +0800)
committerLiming Gao <liming.gao@intel.com>
Thu, 8 Nov 2018 05:40:08 +0000 (13:40 +0800)
commit8cd4e734ccdfbc961c72aeaa8dbd3f5154171f9b
tree32d1441316c47d7e6896ef54f44943582ad1abbc
parent3eacb4751a6879ab2d2a4c1c1b9243fe50b0194c
MdeModulePkg/DisplayEngine: Remove useless NULL ptr check for NewPos

In function UiDisplayMenu, the NewPos ptr which used to point to the
highlight menu entry. It will always point to the menu entry which
need to be highlighted or the gMenuOption menu if the highlight menu
is not found.
So we can remove the NULL ptr check for NewPos in this function.
And add the ASSERT code to avoid if any false positive reports
of NULL pointer dereference issue raised from static analysis.

Cc: Liming Gao <liming.gao@intel.com>
Cc: Eric Dong <eric.dong@intel.com>
Cc: Star Zeng <star.zeng@intel.com>
Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c