Formatting .c/.h files and fix memory leakage issues
Signed-off-by: John Chung <john.chung@arm.com>
Change-Id: Id8328f412c2724992d80c0b3f895c8f85bc4ae68
diff --git a/sections/cper-section-pci-bus.h b/sections/cper-section-pci-bus.h
index cf4371a..6a959e4 100644
--- a/sections/cper-section-pci-bus.h
+++ b/sections/cper-section-pci-bus.h
@@ -4,15 +4,30 @@
#include <json.h>
#include "../edk/Cper.h"
-#define PCI_BUS_ERROR_VALID_BITFIELD_NAMES (const char*[]) {"errorStatusValid", "errorTypeValid", \
- "busIDValid", "busAddressValid", "busDataValid", "commandValid", "requestorIDValid", "completerIDValid", \
- "targetIDValid"}
-#define PCI_BUS_ERROR_TYPES_KEYS (int []){0, 1, 2, 3, 4, 5, 6, 7}
-#define PCI_BUS_ERROR_TYPES_VALUES (const char*[]){"Unknown/OEM Specific Error", "Data Parity Error", \
- "System Error", "Master Abort", "Bus Timeout/No Device Present (No DEVSEL#)", \
- "Master Data Parity Error", "Address Parity Error", "Command Parity Error"}
+#define PCI_BUS_ERROR_VALID_BITFIELD_NAMES \
+ (const char *[]) \
+ { \
+ "errorStatusValid", "errorTypeValid", "busIDValid", \
+ "busAddressValid", "busDataValid", "commandValid", \
+ "requestorIDValid", "completerIDValid", \
+ "targetIDValid" \
+ }
+#define PCI_BUS_ERROR_TYPES_KEYS \
+ (int[]) \
+ { \
+ 0, 1, 2, 3, 4, 5, 6, 7 \
+ }
+#define PCI_BUS_ERROR_TYPES_VALUES \
+ (const char *[]) \
+ { \
+ "Unknown/OEM Specific Error", "Data Parity Error", \
+ "System Error", "Master Abort", \
+ "Bus Timeout/No Device Present (No DEVSEL#)", \
+ "Master Data Parity Error", "Address Parity Error", \
+ "Command Parity Error" \
+ }
-json_object* cper_section_pci_bus_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor);
-void ir_section_pci_bus_to_cper(json_object* section, FILE* out);
+json_object *cper_section_pci_bus_to_ir(void *section);
+void ir_section_pci_bus_to_cper(json_object *section, FILE *out);
-#endif
\ No newline at end of file
+#endif