]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Clean up code.
authorjyao1 <jyao1>
Thu, 7 Aug 2014 05:03:10 +0000 (05:03 +0000)
committerjyao1 <jyao1@6f19259b-4bc3-4df7-8a09-765794883524>
Thu, 7 Aug 2014 05:03:10 +0000 (05:03 +0000)
Contributed-under: TianoCore Contribution Agreement 1.0

Signed off by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15766 6f19259b-4bc3-4df7-8a09-765794883524

SecurityPkg/Library/Tpm2CommandLib/Tpm2Help.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2Hierarchy.c
SecurityPkg/Library/Tpm2CommandLib/Tpm2Integrity.c

index 4f5fcb5a7bdb541a436a2e6d1ebdf512f9754131..5e24290f7c8ad9a72c5e3021a1aacb2e3e2c3d2f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implement TPM2 help.\r
 \r
-Copyright (c) 2013, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -91,7 +91,7 @@ CopyAuthSessionCommand (
 \r
     // sessionAttributes\r
     *(UINT8 *)Buffer = *(UINT8 *)&AuthSessionIn->sessionAttributes;\r
-    Buffer += sizeof(UINT8);\r
+    Buffer++;\r
 \r
     // hmac\r
     WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16 (AuthSessionIn->hmac.size));\r
@@ -110,7 +110,7 @@ CopyAuthSessionCommand (
 \r
     // sessionAttributes = 0\r
     *(UINT8 *)Buffer = 0x00;\r
-    Buffer += sizeof(UINT8);\r
+    Buffer++;\r
 \r
     // hmac = nullAuth\r
     WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16(0));\r
@@ -153,7 +153,7 @@ CopyAuthSessionResponse (
 \r
   // sessionAttributes\r
   *(UINT8 *)&AuthSessionOut->sessionAttributes = *(UINT8 *)Buffer;\r
-  Buffer += sizeof(UINT8);\r
+  Buffer++;\r
 \r
   // hmac\r
   AuthSessionOut->hmac.size = SwapBytes16 (ReadUnaligned16 ((UINT16 *)Buffer));\r
index c6935d9a828d75debd5ae5f0ecd2eadf8a163ecc..9eb4c9c3840397c2416976d32f3a5450abcfb6be 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implement TPM2 Hierarchy related command.\r
 \r
-Copyright (c) 2013, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -228,7 +228,7 @@ Tpm2ClearControl (
 \r
   // disable\r
   *(UINT8 *)Buffer = Disable;\r
-  Buffer += sizeof(UINT8);\r
+  Buffer++;\r
 \r
   CmdSize = (UINT32)(Buffer - (UINT8 *)&Cmd);\r
   Cmd.Header.paramSize   = SwapBytes32(CmdSize);\r
@@ -591,7 +591,7 @@ Tpm2HierarchyControl (
   Buffer += sizeof(UINT32);\r
 \r
   *(UINT8 *)Buffer = State;\r
-  Buffer += sizeof(UINT8);\r
+  Buffer++;\r
 \r
   CmdSize = (UINT32)(Buffer - (UINT8 *)&Cmd);\r
   Cmd.Header.paramSize = SwapBytes32(CmdSize);\r
index 88dcc0afe221ba172d8a3a57809dbb67e31f9056..cfb27ecd6b7494a5aef83ba8e217477951e1046d 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Implement TPM2 Integrity related command.\r
 \r
-Copyright (c) 2013, Intel Corporation. All rights reserved. <BR>\r
+Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved. <BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -470,7 +470,7 @@ Tpm2PcrAllocate (
     WriteUnaligned16 ((UINT16 *)Buffer, SwapBytes16(PcrAllocation->pcrSelections[Index].hash));\r
     Buffer += sizeof(UINT16);\r
     *(UINT8 *)Buffer = PcrAllocation->pcrSelections[Index].sizeofSelect;\r
-    Buffer += sizeof(UINT8);\r
+    Buffer++;\r
     CopyMem (Buffer, PcrAllocation->pcrSelections[Index].pcrSelect, PcrAllocation->pcrSelections[Index].sizeofSelect);\r
     Buffer += PcrAllocation->pcrSelections[Index].sizeofSelect;\r
   }\r