]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Mtftp6Dxe/Mtftp6Support.c
NetworkPkg/Mtftp6Dxe: Correct the total received and saved block number.
[mirror_edk2.git] / NetworkPkg / Mtftp6Dxe / Mtftp6Support.c
index 275272b89e949e8aeb1f0788178c5e0dd63afdf6..f03216afb7cd9324623559505757452b1800b985 100644 (file)
@@ -158,8 +158,8 @@ Mtftp6SetLastBlockNum (
 \r
   @param[in]  Head                   The block range list to remove from.\r
   @param[in]  Num                    The block number to remove.\r
-  @param[in]  Completed              Whether Num is the last block number\r
-  @param[out] TotalBlock             The continuous block number in all\r
+  @param[in]  Completed              Whether Num is the last block number.\r
+  @param[out] BlockCounter           The continuous block counter instead of the value after roll-over.\r
 \r
   @retval EFI_NOT_FOUND          The block number isn't in the block range list.\r
   @retval EFI_SUCCESS            The block number has been removed from the list.\r
@@ -171,7 +171,7 @@ Mtftp6RemoveBlockNum (
   IN LIST_ENTRY             *Head,\r
   IN UINT16                 Num,\r
   IN BOOLEAN                Completed,\r
-  OUT UINT64                *TotalBlock\r
+  OUT UINT64                *BlockCounter\r
   )\r
 {\r
   MTFTP6_BLOCK_RANGE        *Range;\r
@@ -220,10 +220,10 @@ Mtftp6RemoveBlockNum (
       // wrap to zero, because this is the simplest to implement. Here we choose\r
       // this solution.\r
       //\r
-      *TotalBlock  = Num;\r
+      *BlockCounter  = Num;\r
 \r
       if (Range->Round > 0) {\r
-        *TotalBlock += Range->Bound +  MultU64x32 (Range->Round - 1, (UINT32)(Range->Bound + 1)) + 1;\r
+        *BlockCounter += Range->Bound +  MultU64x32 (Range->Round - 1, (UINT32)(Range->Bound + 1)) + 1;\r
       }\r
 \r
       if (Range->Start > Range->Bound) {\r