]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c
Refine soma code to make code run safely.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / UefiPxeBcDxe / PxeBcImpl.c
index 50736a9731e6bc24ddb45f35523b6aa4dcddb783..c3cb765837833d9130fd8248882dc3e9b21ec505 100644 (file)
@@ -677,7 +677,7 @@ ON_EXIT:
       ZeroMem (&ArpConfigData, sizeof (EFI_ARP_CONFIG_DATA));\r
 \r
       ArpConfigData.SwAddressType   = 0x0800;\r
-      ArpConfigData.SwAddressLength = sizeof (EFI_IPv4_ADDRESS);\r
+      ArpConfigData.SwAddressLength = (UINT8) sizeof (EFI_IPv4_ADDRESS);\r
       ArpConfigData.StationAddress  = &Private->StationIp.v4;\r
 \r
       Private->Arp->Configure (Private->Arp, NULL);\r
@@ -2263,7 +2263,7 @@ EfiPxeBcSetStationIP (
     ZeroMem (&ArpConfigData, sizeof (EFI_ARP_CONFIG_DATA));\r
 \r
     ArpConfigData.SwAddressType   = 0x0800;\r
-    ArpConfigData.SwAddressLength = sizeof (EFI_IPv4_ADDRESS);\r
+    ArpConfigData.SwAddressLength = (UINT8) sizeof (EFI_IPv4_ADDRESS);\r
     ArpConfigData.StationAddress  = &Private->StationIp.v4;\r
 \r
     Private->Arp->Configure (Private->Arp, NULL);\r