]> git.proxmox.com Git - mirror_edk2.git/commitdiff
SecurityPkg: Tcg2Smm: Refine type cast in pointer abstraction
authorZhang, Chao B <chao.b.zhang@intel.com>
Thu, 8 Feb 2018 06:22:39 +0000 (14:22 +0800)
committerZhang, Chao B <chao.b.zhang@intel.com>
Thu, 8 Feb 2018 08:09:33 +0000 (16:09 +0800)
Pointer subtraction is not performed by pointers to elements of the same
array object. Such behavior is undefined by C11 standard and might lead to
potential issues, Refine pointer subtraction by first casting each pointer
to UINTN.

Cc: Hao Wu <hao.a.wu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Chao Zhang <chao.b.zhang@intel.com>
Reviewed-by: Hao Wu <hao.a.wu@intel.com>

No differences found