X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=BaseTools%2FSource%2FC%2FDevicePath%2FDevicePath.c;h=76b8553b7145296b886176151eedf66fc8a93fb9;hp=4c87163209ab11a2d5a3526f671b350c488797a2;hb=9a6b445bc2e6e2db6f67ab3cc425d5831aa1b7c8;hpb=beacbc7492393992a8d10cd0a450c308a482f315 diff --git a/BaseTools/Source/C/DevicePath/DevicePath.c b/BaseTools/Source/C/DevicePath/DevicePath.c index 4c87163209..76b8553b71 100644 --- a/BaseTools/Source/C/DevicePath/DevicePath.c +++ b/BaseTools/Source/C/DevicePath/DevicePath.c @@ -103,11 +103,19 @@ Returns: } -void print_mem(void const *vp, size_t n) +STATIC +VOID +PrintMem ( + CONST VOID *Buffer, + UINTN Count + ) { - unsigned char const *p = vp; - for (size_t i=0; iType == END_DEVICE_PATH_TYPE) && (DevicePath->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE)) ) { - print_mem(DevicePath, (DevicePath->Length[0] | DevicePath->Length[1] << 8)); + PrintMem (DevicePath, DevicePath->Length[0] | DevicePath->Length[1] << 8); DevicePath = (EFI_DEVICE_PATH_PROTOCOL *)((UINT8 *)DevicePath + (DevicePath->Length[0] | DevicePath->Length[1] << 8)); } - print_mem(DevicePath, (DevicePath->Length[0] | DevicePath->Length[1] << 8)); + PrintMem (DevicePath, DevicePath->Length[0] | DevicePath->Length[1] << 8); putchar('\n'); return STATUS_SUCCESS; }