RedfishPkg: Apply uncrustify changes

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737

Apply uncrustify changes to .c/.h files in the RedfishPkg 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: Abner Chang <abner.chang@hpe.com>
This commit is contained in:
Michael Kubacki
2021-12-05 14:54:11 -08:00
committed by mergify[bot]
parent 5220bd211d
commit 39de741e2d
56 changed files with 6067 additions and 4616 deletions

View File

@@ -36,7 +36,7 @@ JsonValueInitArray (
VOID
)
{
return (EDKII_JSON_VALUE)json_array();
return (EDKII_JSON_VALUE)json_array ();
}
/**
@@ -58,7 +58,7 @@ JsonValueInitObject (
VOID
)
{
return (EDKII_JSON_VALUE)json_object();
return (EDKII_JSON_VALUE)json_object ();
}
/**
@@ -83,10 +83,10 @@ JsonValueInitObject (
EDKII_JSON_VALUE
EFIAPI
JsonValueInitAsciiString (
IN CONST CHAR8 *String
IN CONST CHAR8 *String
)
{
UINTN Index;
UINTN Index;
if (String == NULL) {
return NULL;
@@ -124,11 +124,11 @@ JsonValueInitAsciiString (
EDKII_JSON_VALUE
EFIAPI
JsonValueInitUnicodeString (
IN CHAR16 *String
IN CHAR16 *String
)
{
EFI_STATUS Status;
CHAR8 *Utf8Str;
EFI_STATUS Status;
CHAR8 *Utf8Str;
if (String == NULL) {
return NULL;
@@ -160,7 +160,7 @@ JsonValueInitUnicodeString (
EDKII_JSON_VALUE
EFIAPI
JsonValueInitInteger (
IN INT64 Value
IN INT64 Value
)
{
return (EDKII_JSON_VALUE)json_integer (Value);
@@ -180,7 +180,7 @@ JsonValueInitInteger (
EDKII_JSON_VALUE
EFIAPI
JsonValueInitBoolean (
IN BOOLEAN Value
IN BOOLEAN Value
)
{
return (EDKII_JSON_VALUE)json_boolean (Value);
@@ -201,7 +201,7 @@ JsonValueInitTrue (
VOID
)
{
return (EDKII_JSON_VALUE)json_true();
return (EDKII_JSON_VALUE)json_true ();
}
/**
@@ -219,7 +219,7 @@ JsonValueInitFalse (
VOID
)
{
return (EDKII_JSON_VALUE)json_false();
return (EDKII_JSON_VALUE)json_false ();
}
/**
@@ -237,7 +237,7 @@ JsonValueInitNull (
VOID
)
{
return (EDKII_JSON_VALUE)json_null();
return (EDKII_JSON_VALUE)json_null ();
}
/**
@@ -263,10 +263,10 @@ JsonValueInitNull (
VOID
EFIAPI
JsonValueFree (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
json_decref((json_t *)Json);
json_decref ((json_t *)Json);
}
/**
@@ -289,10 +289,10 @@ JsonValueFree (
EDKII_JSON_VALUE
EFIAPI
JsonValueClone (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
return (EDKII_JSON_VALUE)json_deep_copy ((json_t *) Json);
return (EDKII_JSON_VALUE)json_deep_copy ((json_t *)Json);
}
/**
@@ -307,10 +307,10 @@ JsonValueClone (
BOOLEAN
EFIAPI
JsonValueIsArray (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
return json_is_array ((json_t *) Json);
return json_is_array ((json_t *)Json);
}
/**
@@ -325,10 +325,10 @@ JsonValueIsArray (
BOOLEAN
EFIAPI
JsonValueIsObject (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
return json_is_object ((json_t *) Json);
return json_is_object ((json_t *)Json);
}
/**
@@ -344,10 +344,10 @@ JsonValueIsObject (
BOOLEAN
EFIAPI
JsonValueIsString (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
return json_is_string ((json_t *) Json);
return json_is_string ((json_t *)Json);
}
/**
@@ -362,10 +362,10 @@ JsonValueIsString (
BOOLEAN
EFIAPI
JsonValueIsInteger (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
return json_is_integer ((json_t *) Json);
return json_is_integer ((json_t *)Json);
}
/**
@@ -380,10 +380,10 @@ JsonValueIsInteger (
BOOLEAN
EFIAPI
JsonValueIsNumber (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
return json_is_number ((json_t *) Json);
return json_is_number ((json_t *)Json);
}
/**
@@ -398,10 +398,10 @@ JsonValueIsNumber (
BOOLEAN
EFIAPI
JsonValueIsBoolean (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
return json_is_boolean ((json_t *) Json);
return json_is_boolean ((json_t *)Json);
}
/**
@@ -416,12 +416,13 @@ JsonValueIsBoolean (
BOOLEAN
EFIAPI
JsonValueIsTrue (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
if (json_is_true ((json_t *)Json)) {
return TRUE;
}
return FALSE;
}
@@ -437,14 +438,16 @@ JsonValueIsTrue (
BOOLEAN
EFIAPI
JsonValueIsFalse (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
if (json_is_false ((json_t *)Json)) {
return TRUE;
}
return FALSE;
}
/**
The function is used to return if the provided JSON value contains a JSON NULL.
@@ -457,10 +460,10 @@ JsonValueIsFalse (
BOOLEAN
EFIAPI
JsonValueIsNull (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
return json_is_null ((json_t *) Json);
return json_is_null ((json_t *)Json);
}
/**
@@ -476,10 +479,10 @@ JsonValueIsNull (
EDKII_JSON_ARRAY
EFIAPI
JsonValueGetArray (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
if (Json == NULL || !JsonValueIsArray (Json)) {
if ((Json == NULL) || !JsonValueIsArray (Json)) {
return NULL;
}
@@ -499,10 +502,10 @@ JsonValueGetArray (
EDKII_JSON_OBJECT
EFIAPI
JsonValueGetObject (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
if (Json == NULL || !JsonValueIsObject (Json)) {
if ((Json == NULL) || !JsonValueIsObject (Json)) {
return NULL;
}
@@ -522,13 +525,13 @@ JsonValueGetObject (
CONST CHAR8 *
EFIAPI
JsonValueGetAsciiString (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
CONST CHAR8 *AsciiStr;
UINTN Index;
CONST CHAR8 *AsciiStr;
UINTN Index;
AsciiStr = json_string_value ((json_t *) Json);
AsciiStr = json_string_value ((json_t *)Json);
if (AsciiStr == NULL) {
return NULL;
}
@@ -556,22 +559,22 @@ JsonValueGetAsciiString (
@retval Return the associated Unicode string in JSON value or NULL.
**/
CHAR16*
CHAR16 *
EFIAPI
JsonValueGetUnicodeString (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
EFI_STATUS Status;
CONST CHAR8 *Utf8Str;
CHAR16 *Ucs2Str;
EFI_STATUS Status;
CONST CHAR8 *Utf8Str;
CHAR16 *Ucs2Str;
Utf8Str = json_string_value ((json_t *) Json);
Utf8Str = json_string_value ((json_t *)Json);
if (Utf8Str == NULL) {
return NULL;
}
Status = UTF8StrToUCS2 ((CHAR8*)Utf8Str, &Ucs2Str);
Status = UTF8StrToUCS2 ((CHAR8 *)Utf8Str, &Ucs2Str);
if (EFI_ERROR (Status)) {
return NULL;
}
@@ -593,15 +596,15 @@ JsonValueGetUnicodeString (
INT64
EFIAPI
JsonValueGetInteger (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
ASSERT (Json != NULL && JsonValueIsInteger (Json));
if (Json == NULL || !JsonValueIsInteger (Json)) {
if ((Json == NULL) || !JsonValueIsInteger (Json)) {
return 0;
}
return json_integer_value ((json_t *) Json);
return json_integer_value ((json_t *)Json);
}
/**
@@ -618,15 +621,15 @@ JsonValueGetInteger (
BOOLEAN
EFIAPI
JsonValueGetBoolean (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
ASSERT (Json != NULL && JsonValueIsBoolean (Json));
if (Json == NULL || !JsonValueIsBoolean (Json)) {
if ((Json == NULL) || !JsonValueIsBoolean (Json)) {
return FALSE;
}
return json_is_true ((json_t *) Json);
return json_is_true ((json_t *)Json);
}
/**
@@ -639,10 +642,10 @@ JsonValueGetBoolean (
@retval Return the associated Ascii string in JSON value or NULL on errors.
**/
CONST CHAR8*
CONST CHAR8 *
EFIAPI
JsonValueGetString (
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_VALUE Json
)
{
return json_string_value ((const json_t *)Json);
@@ -660,10 +663,10 @@ JsonValueGetString (
UINTN
EFIAPI
JsonObjectSize (
IN EDKII_JSON_OBJECT JsonObject
IN EDKII_JSON_OBJECT JsonObject
)
{
return json_object_size ((json_t *) JsonObject);
return json_object_size ((json_t *)JsonObject);
}
/**
@@ -679,24 +682,23 @@ JsonObjectSize (
JsonObj is not an JSON object, key count is zero or on other errors.
**/
CHAR8**
CHAR8 **
JsonObjectGetKeys (
IN EDKII_JSON_OBJECT JsonObj,
OUT UINTN *KeyCount
IN EDKII_JSON_OBJECT JsonObj,
OUT UINTN *KeyCount
)
{
UINTN Index;
CONST CHAR8 **KeyArray;
CONST CHAR8 *Key;
EDKII_JSON_VALUE Value;
UINTN Index;
CONST CHAR8 **KeyArray;
CONST CHAR8 *Key;
EDKII_JSON_VALUE Value;
if (JsonObj == NULL || KeyCount == NULL) {
if ((JsonObj == NULL) || (KeyCount == NULL)) {
return NULL;
}
Index = 0;
json_object_foreach(JsonObj, Key, Value) {
json_object_foreach (JsonObj, Key, Value) {
Index++;
}
if (Index == 0) {
@@ -705,7 +707,7 @@ JsonObjectGetKeys (
}
*KeyCount = Index;
KeyArray = (CONST CHAR8 **) AllocateZeroPool (*KeyCount * sizeof (CHAR8 *));
KeyArray = (CONST CHAR8 **)AllocateZeroPool (*KeyCount * sizeof (CHAR8 *));
if (KeyArray == NULL) {
return NULL;
}
@@ -713,7 +715,7 @@ JsonObjectGetKeys (
Key = NULL;
Value = NULL;
Index = 0;
json_object_foreach((json_t *) JsonObj, Key, Value) {
json_object_foreach ((json_t *)JsonObj, Key, Value) {
KeyArray[Index] = Key;
Index++;
}
@@ -740,8 +742,8 @@ JsonObjectGetKeys (
EDKII_JSON_VALUE
EFIAPI
JsonObjectGetValue (
IN CONST EDKII_JSON_OBJECT JsonObj,
IN CONST CHAR8 *Key
IN CONST EDKII_JSON_OBJECT JsonObj,
IN CONST CHAR8 *Key
)
{
return (EDKII_JSON_VALUE)json_object_get ((const json_t *)JsonObj, (const char *)Key);
@@ -768,12 +770,12 @@ JsonObjectGetValue (
EFI_STATUS
EFIAPI
JsonObjectSetValue (
IN EDKII_JSON_OBJECT JsonObj,
IN CONST CHAR8 *Key,
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_OBJECT JsonObj,
IN CONST CHAR8 *Key,
IN EDKII_JSON_VALUE Json
)
{
if (json_object_set ((json_t *) JsonObj, Key, (json_t *) Json) != 0) {
if (json_object_set ((json_t *)JsonObj, Key, (json_t *)Json) != 0) {
return EFI_ABORTED;
} else {
return EFI_SUCCESS;
@@ -792,10 +794,10 @@ JsonObjectSetValue (
UINTN
EFIAPI
JsonArrayCount (
IN EDKII_JSON_ARRAY JsonArray
IN EDKII_JSON_ARRAY JsonArray
)
{
return json_array_size ((json_t *) JsonArray);
return json_array_size ((json_t *)JsonArray);
}
/**
@@ -817,11 +819,11 @@ JsonArrayCount (
EDKII_JSON_VALUE
EFIAPI
JsonArrayGetValue (
IN EDKII_JSON_ARRAY JsonArray,
IN UINTN Index
IN EDKII_JSON_ARRAY JsonArray,
IN UINTN Index
)
{
return (EDKII_JSON_VALUE)json_array_get ((json_t *) JsonArray, Index);
return (EDKII_JSON_VALUE)json_array_get ((json_t *)JsonArray, Index);
}
/**
@@ -840,11 +842,11 @@ JsonArrayGetValue (
EFI_STATUS
EFIAPI
JsonArrayAppendValue (
IN EDKII_JSON_ARRAY JsonArray,
IN EDKII_JSON_VALUE Json
IN EDKII_JSON_ARRAY JsonArray,
IN EDKII_JSON_VALUE Json
)
{
if (json_array_append ((json_t *) JsonArray, (json_t *) Json) != 0) {
if (json_array_append ((json_t *)JsonArray, (json_t *)Json) != 0) {
return EFI_ABORTED;
} else {
return EFI_SUCCESS;
@@ -868,11 +870,11 @@ JsonArrayAppendValue (
EFI_STATUS
EFIAPI
JsonArrayRemoveValue (
IN EDKII_JSON_ARRAY JsonArray,
IN UINTN Index
IN EDKII_JSON_ARRAY JsonArray,
IN UINTN Index
)
{
if (json_array_remove ((json_t *) JsonArray, Index) != 0) {
if (json_array_remove ((json_t *)JsonArray, Index) != 0) {
return EFI_ABORTED;
} else {
return EFI_SUCCESS;
@@ -904,14 +906,15 @@ JsonArrayRemoveValue (
CHAR8 *
EFIAPI
JsonDumpString (
IN EDKII_JSON_VALUE JsonValue,
IN UINTN Flags
IN EDKII_JSON_VALUE JsonValue,
IN UINTN Flags
)
{
if (JsonValue == NULL) {
return NULL;
}
return json_dumps((json_t *)JsonValue, Flags);
if (JsonValue == NULL) {
return NULL;
}
return json_dumps ((json_t *)JsonValue, Flags);
}
/**
@@ -934,12 +937,12 @@ JsonDumpString (
EDKII_JSON_VALUE
EFIAPI
JsonLoadString (
IN CONST CHAR8* String,
IN UINT64 Flags,
IN EDKII_JSON_ERROR *Error
IN CONST CHAR8 *String,
IN UINT64 Flags,
IN EDKII_JSON_ERROR *Error
)
{
return (EDKII_JSON_VALUE) json_loads ((const char *)String, Flags, (json_error_t *)Error);
return (EDKII_JSON_VALUE)json_loads ((const char *)String, Flags, (json_error_t *)Error);
}
/**
@@ -964,13 +967,13 @@ JsonLoadString (
EDKII_JSON_VALUE
EFIAPI
JsonLoadBuffer (
IN CONST CHAR8 *Buffer,
IN CONST CHAR8 *Buffer,
IN UINTN BufferLen,
IN UINTN Flags,
IN OUT EDKII_JSON_ERROR *Error
)
{
return json_loadb(Buffer, BufferLen, Flags, (json_error_t *)Error);
return json_loadb (Buffer, BufferLen, Flags, (json_error_t *)Error);
}
/**
@@ -989,7 +992,7 @@ JsonLoadBuffer (
VOID
EFIAPI
JsonDecreaseReference (
IN EDKII_JSON_VALUE JsonValue
IN EDKII_JSON_VALUE JsonValue
)
{
json_decref (JsonValue);
@@ -1010,7 +1013,7 @@ JsonDecreaseReference (
EDKII_JSON_VALUE
EFIAPI
JsonIncreaseReference (
IN EDKII_JSON_VALUE JsonValue
IN EDKII_JSON_VALUE JsonValue
)
{
return json_incref (JsonValue);
@@ -1026,7 +1029,7 @@ JsonIncreaseReference (
VOID *
EFIAPI
JsonObjectIterator (
IN EDKII_JSON_VALUE JsonValue
IN EDKII_JSON_VALUE JsonValue
)
{
return json_object_iter (JsonValue);
@@ -1041,10 +1044,10 @@ JsonObjectIterator (
EDKII_JSON_VALUE
EFIAPI
JsonObjectIteratorValue (
IN VOID *Iterator
IN VOID *Iterator
)
{
return json_object_iter_value(Iterator);
return json_object_iter_value (Iterator);
}
/**
@@ -1058,11 +1061,11 @@ JsonObjectIteratorValue (
VOID *
EFIAPI
JsonObjectIteratorNext (
IN EDKII_JSON_VALUE JsonValue,
IN VOID *Iterator
IN EDKII_JSON_VALUE JsonValue,
IN VOID *Iterator
)
{
return json_object_iter_next(JsonValue, Iterator);
return json_object_iter_next (JsonValue, Iterator);
}
/**
@@ -1074,10 +1077,10 @@ JsonObjectIteratorNext (
CHAR8 *
EFIAPI
JsonObjectIteratorKey (
IN VOID *Iterator
)
IN VOID *Iterator
)
{
return (CHAR8 *)json_object_iter_key(Iterator);
return (CHAR8 *)json_object_iter_key (Iterator);
}
/**
@@ -1089,10 +1092,10 @@ JsonObjectIteratorKey (
VOID *
EFIAPI
JsonObjectKeyToIterator (
IN CHAR8 *Key
)
IN CHAR8 *Key
)
{
return json_object_key_to_iter(Key);
return json_object_key_to_iter (Key);
}
/**
@@ -1104,7 +1107,7 @@ JsonObjectKeyToIterator (
EDKII_JSON_TYPE
EFIAPI
JsonGetType (
IN EDKII_JSON_VALUE JsonValue
IN EDKII_JSON_VALUE JsonValue
)
{
return ((json_t *)JsonValue)->type;