Change the value from "sizeof(UINT8)" to 1 in the arithmetic expression.
The original value added to (UINT8 *)&GetBmcGlobalEnables is
(sizeof(UINT8)*sizeof(UINT8)) which equals to 1, so the functionality
looks right. But the arithmetic logic is actually wrong.

Cc: Michael Kubacki <[email protected]>
Cc: Sai Chaganty <[email protected]>
Cc: Liming Gao <[email protected]>
Signed-off-by: Shenglei Zhang <[email protected]>
---
 Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c 
b/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c
index 421fbdec..beaa3fa0 100644
--- a/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c
+++ b/Platform/Intel/AdvancedFeaturePkg/Ipmi/BmcElog/BmcElog.c
@@ -131,7 +131,7 @@ Returns:
         ElogStat = 1;
       }
 
-      CopyMem (&SetBmcGlobalEnables, (UINT8 *)&GetBmcGlobalEnables + 
sizeof(UINT8), sizeof(UINT8));
+      CopyMem (&SetBmcGlobalEnables, (UINT8 *)&GetBmcGlobalEnables + 1, 
sizeof(UINT8));
       SetBmcGlobalEnables.SetEnables.Bits.SystemEventLogging = ElogStat;
 
       Status = IpmiSetBmcGlobalEnables (&SetBmcGlobalEnables, &CompletionCode);
-- 
2.18.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#46665): https://edk2.groups.io/g/devel/message/46665
Mute This Topic: https://groups.io/mt/33110327/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to