diff --git a/ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c b/ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c index 7f346077e6..d63a2d989f 100644 --- a/ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c +++ b/ArmVirtPkg/Library/NorFlashQemuLib/NorFlashQemuLib.c @@ -46,6 +46,6 @@ NorFlashPlatformGetDevices ( ) { *NorFlashDescriptions = mNorFlashDevices; - *Count = sizeof (mNorFlashDevices) / sizeof (mNorFlashDevices[0]); + *Count = ARRAY_SIZE (mNorFlashDevices); return EFI_SUCCESS; }