OcMiscLib and OcSmbiosLib: Deprecate Macro.h usage

This commit is contained in:
Download-Fritz 2019-03-09 17:38:27 +01:00
parent 9c37d9640f
commit 5cafa78d4b
2 changed files with 6 additions and 11 deletions

View File

@ -33,8 +33,6 @@
#include <Library/UefiLib.h>
#include <Library/UefiRuntimeServicesTableLib.h>
#include <Macros.h>
// ConvertDataToString
/** Attempt to convert the data into an ascii string.
@ -71,7 +69,7 @@ ConvertDataToString (
VariableSize = DataSize;
// Detect Unicode String
if ((IS_ASCII (*(CHAR16 *)VariableData) > 0) && (DataSize > sizeof (CHAR16))) {
if (DataSize > sizeof (CHAR16)) {
IsUnicode = TRUE;
do {
@ -91,7 +89,7 @@ ConvertDataToString (
IsUnicode = FALSE;
}
} else if ((IS_ASCII (*(CHAR8 *)VariableData) > 0) && (DataSize > sizeof (CHAR8))) {
} else if (DataSize > sizeof (CHAR8)) {
IsAscii = TRUE;
// Detect Ascii String

View File

@ -19,8 +19,6 @@
#include <Library/DebugLib.h>
#include <Library/UefiLib.h>
#include <Macros.h>
#include "DebugSmbios.h"
#include "SmbiosInternal.h"
@ -232,11 +230,10 @@ SmbiosDebugSystemEnclosure (
DEBUG_INFO,
" %-16a %a\n",
"SKUNumber",
SmbiosGetString (Record, *(PTR_OFFSET(Record.Raw,
MultU64x32 (
Record.Standard.Type3->ContainedElementCount,
Record.Standard.Type3->ContainedElementRecordLength) + 0x15,
UINT8 *)))
SmbiosGetString (Record, *(Record.Raw +
MultU64x32 (
Record.Standard.Type3->ContainedElementCount,
Record.Standard.Type3->ContainedElementRecordLength) + 0x15))
));
}