diff mbox

[edk2,38/47] OvmfPkg/QemuVideoDxe: rebase to ARRAY_SIZE()

Message ID 20161026190504.9888-39-lersek@redhat.com
State Accepted
Commit b1bc305cf4a725fdf5350e9d1c84941010829f37
Headers show

Commit Message

Laszlo Ersek Oct. 26, 2016, 7:04 p.m. UTC
Cc: Jordan Justen <jordan.l.justen@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Laszlo Ersek <lersek@redhat.com>

---
 OvmfPkg/QemuVideoDxe/Initialize.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

-- 
2.9.2


_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel
diff mbox

Patch

diff --git a/OvmfPkg/QemuVideoDxe/Initialize.c b/OvmfPkg/QemuVideoDxe/Initialize.c
index 98ca4f8488fe..d5d8cfef9661 100644
--- a/OvmfPkg/QemuVideoDxe/Initialize.c
+++ b/OvmfPkg/QemuVideoDxe/Initialize.c
@@ -155,7 +155,7 @@  QEMU_VIDEO_CIRRUS_MODES  QemuVideoCirrusModes[] = {
 };
 
 #define QEMU_VIDEO_CIRRUS_MODE_COUNT \
-  (sizeof (QemuVideoCirrusModes) / sizeof (QemuVideoCirrusModes[0]))
+  (ARRAY_SIZE (QemuVideoCirrusModes))
 
 /**
   Construct the valid video modes for QemuVideo.
@@ -247,7 +247,7 @@  QEMU_VIDEO_BOCHS_MODES  QemuVideoBochsModes[] = {
 };
 
 #define QEMU_VIDEO_BOCHS_MODE_COUNT \
-  (sizeof (QemuVideoBochsModes) / sizeof (QemuVideoBochsModes[0]))
+  (ARRAY_SIZE (QemuVideoBochsModes))
 
 EFI_STATUS
 QemuVideoBochsModeSetup (