MdePkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
1436aea4d5
commit
2f88bd3a12
@@ -42,7 +42,8 @@ SafeInt32ToUintn (
|
||||
if (sizeof (UINTN) == sizeof (UINT32)) {
|
||||
return SafeInt32ToUint32 (Operand, (UINT32 *)Result);
|
||||
}
|
||||
return SafeInt32ToUint64 (Operand, (UINT64 *) Result);
|
||||
|
||||
return SafeInt32ToUint64 (Operand, (UINT64 *)Result);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -79,6 +80,7 @@ SafeUint32ToIntn (
|
||||
if (sizeof (UINTN) == sizeof (UINT32)) {
|
||||
return SafeUint32ToInt32 (Operand, (INT32 *)Result);
|
||||
}
|
||||
|
||||
*Result = Operand;
|
||||
return RETURN_SUCCESS;
|
||||
}
|
||||
@@ -118,7 +120,8 @@ SafeIntnToInt32 (
|
||||
*Result = (INT32)Operand;
|
||||
return RETURN_SUCCESS;
|
||||
}
|
||||
return SafeInt64ToInt32 ((INT64) Operand, Result);
|
||||
|
||||
return SafeInt64ToInt32 ((INT64)Operand, Result);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -157,14 +160,15 @@ SafeIntnToUint32 (
|
||||
if (sizeof (UINTN) == sizeof (UINT32)) {
|
||||
if (Operand >= 0) {
|
||||
*Result = (UINT32)Operand;
|
||||
Status = RETURN_SUCCESS;
|
||||
Status = RETURN_SUCCESS;
|
||||
} else {
|
||||
*Result = UINT32_ERROR;
|
||||
Status = RETURN_BUFFER_TOO_SMALL;
|
||||
Status = RETURN_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
return SafeInt64ToUint32 ((INT64)Operand, Result);
|
||||
}
|
||||
|
||||
@@ -203,6 +207,7 @@ SafeUintnToUint32 (
|
||||
*Result = (UINT32)Operand;
|
||||
return RETURN_SUCCESS;
|
||||
}
|
||||
|
||||
return SafeUint64ToUint32 ((UINT64)Operand, Result);
|
||||
}
|
||||
|
||||
@@ -241,6 +246,7 @@ SafeUintnToInt64 (
|
||||
*Result = (INT64)Operand;
|
||||
return RETURN_SUCCESS;
|
||||
}
|
||||
|
||||
return SafeUint64ToInt64 ((UINT64)Operand, Result);
|
||||
}
|
||||
|
||||
@@ -278,6 +284,7 @@ SafeInt64ToIntn (
|
||||
if (sizeof (UINTN) == sizeof (UINT32)) {
|
||||
return SafeInt64ToInt32 (Operand, (INT32 *)Result);
|
||||
}
|
||||
|
||||
*Result = (INTN)Operand;
|
||||
return RETURN_SUCCESS;
|
||||
}
|
||||
@@ -312,6 +319,7 @@ SafeInt64ToUintn (
|
||||
if (sizeof (UINTN) == sizeof (UINT32)) {
|
||||
return SafeInt64ToUint32 (Operand, (UINT32 *)Result);
|
||||
}
|
||||
|
||||
return SafeInt64ToUint64 (Operand, (UINT64 *)Result);
|
||||
}
|
||||
|
||||
@@ -347,8 +355,9 @@ SafeUint64ToUintn (
|
||||
}
|
||||
|
||||
if (sizeof (UINTN) == sizeof (UINT32)) {
|
||||
return SafeUint64ToUint32 ((UINT64) Operand, (UINT32 *)Result);
|
||||
return SafeUint64ToUint32 ((UINT64)Operand, (UINT32 *)Result);
|
||||
}
|
||||
|
||||
*Result = Operand;
|
||||
return RETURN_SUCCESS;
|
||||
}
|
||||
@@ -391,14 +400,15 @@ SafeUintnAdd (
|
||||
if (sizeof (UINTN) == sizeof (UINT32)) {
|
||||
if ((UINT32)(Augend + Addend) >= Augend) {
|
||||
*Result = (Augend + Addend);
|
||||
Status = RETURN_SUCCESS;
|
||||
Status = RETURN_SUCCESS;
|
||||
} else {
|
||||
*Result = UINTN_ERROR;
|
||||
Status = RETURN_BUFFER_TOO_SMALL;
|
||||
Status = RETURN_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
return SafeUint64Add ((UINT64)Augend, (UINT64)Addend, (UINT64 *)Result);
|
||||
}
|
||||
|
||||
@@ -440,14 +450,15 @@ SafeUintnSub (
|
||||
if (sizeof (UINTN) == sizeof (UINT32)) {
|
||||
if (Minuend >= Subtrahend) {
|
||||
*Result = (Minuend - Subtrahend);
|
||||
Status = RETURN_SUCCESS;
|
||||
Status = RETURN_SUCCESS;
|
||||
} else {
|
||||
*Result = UINTN_ERROR;
|
||||
Status = RETURN_BUFFER_TOO_SMALL;
|
||||
Status = RETURN_BUFFER_TOO_SMALL;
|
||||
}
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
return SafeUint64Sub ((UINT64)Minuend, (UINT64)Subtrahend, (UINT64 *)Result);
|
||||
}
|
||||
|
||||
@@ -483,10 +494,11 @@ SafeUintnMult (
|
||||
UINT64 IntermediateResult;
|
||||
|
||||
if (sizeof (UINTN) == sizeof (UINT32)) {
|
||||
IntermediateResult = ((UINT64) Multiplicand) *((UINT64) Multiplier);
|
||||
IntermediateResult = ((UINT64)Multiplicand) *((UINT64)Multiplier);
|
||||
|
||||
return SafeUint64ToUintn (IntermediateResult, Result);
|
||||
}
|
||||
|
||||
return SafeUint64Mult ((UINT64)Multiplicand, (UINT64)Multiplier, (UINT64 *)Result);
|
||||
}
|
||||
|
||||
@@ -522,6 +534,7 @@ SafeIntnAdd (
|
||||
if (sizeof (UINTN) == sizeof (UINT32)) {
|
||||
return SafeInt64ToIntn (((INT64)Augend) + ((INT64)Addend), Result);
|
||||
}
|
||||
|
||||
return SafeInt64Add ((INT64)Augend, (INT64)Addend, (INT64 *)Result);
|
||||
}
|
||||
|
||||
@@ -557,6 +570,7 @@ SafeIntnSub (
|
||||
if (sizeof (UINTN) == sizeof (UINT32)) {
|
||||
return SafeInt64ToIntn (((INT64)Minuend) - ((INT64)Subtrahend), Result);
|
||||
}
|
||||
|
||||
return SafeInt64Sub ((INT64)Minuend, (INT64)Subtrahend, (INT64 *)Result);
|
||||
}
|
||||
|
||||
@@ -592,6 +606,6 @@ SafeIntnMult (
|
||||
if (sizeof (UINTN) == sizeof (UINT32)) {
|
||||
return SafeInt64ToIntn (((INT64)Multiplicand) *((INT64)Multiplier), Result);
|
||||
}
|
||||
|
||||
return SafeInt64Mult ((INT64)Multiplicand, (INT64)Multiplier, (INT64 *)Result);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user