]> git.proxmox.com Git - mirror_edk2.git/commit
MdePkg/MemoryLib: Refine InternalMemSetMem16|32|64 functions logic
authorHao Wu <hao.a.wu@intel.com>
Tue, 15 Nov 2016 05:26:47 +0000 (13:26 +0800)
committerHao Wu <hao.a.wu@intel.com>
Thu, 22 Dec 2016 08:17:16 +0000 (16:17 +0800)
commit9088c61e2d2de8c844f1850e6a96a69f81c0d010
tree59ad0136e942c0bd18c1ea935937bc60717ddaf7
parent753a18f965cb9cd9e48d376a6c71823548eeb3a0
MdePkg/MemoryLib: Refine InternalMemSetMem16|32|64 functions logic

This commit refines the logic for InternalMemSetMem16|32|64 functions. It
avoids using the decrement operator '--' for array index to prevent
possible mis-reports by static code checkers.

Please note that those modified functions are only consumed within
MemoryLib by APIs SetMem16|32|64, and those APIs will handle the case when
the input number of bytes to set is 0. Hence, the behavior of APIs
SetMem16|32|64 is not changed.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Michael Kinney <michael.d.kinney@intel.com>
MdePkg/Library/BaseMemoryLib/MemLibGeneric.c
MdePkg/Library/PeiMemoryLib/MemLibGeneric.c
MdePkg/Library/UefiMemoryLib/MemLibGeneric.c