diff --git a/sections/cper-section-firmware.c b/sections/cper-section-firmware.c
index 5e17e90..a3c3002 100644
--- a/sections/cper-section-firmware.c
+++ b/sections/cper-section-firmware.c
@@ -11,45 +11,56 @@
 #include "cper-section-firmware.h"
 
 //Converts a single firmware CPER section into JSON IR.
-json_object* cper_section_firmware_to_ir(void* section, EFI_ERROR_SECTION_DESCRIPTOR* descriptor)
+json_object *
+cper_section_firmware_to_ir(void *section,
+			    EFI_ERROR_SECTION_DESCRIPTOR *descriptor)
 {
-    EFI_FIRMWARE_ERROR_DATA* firmware_error = (EFI_FIRMWARE_ERROR_DATA*)section;
-    json_object* section_ir = json_object_new_object();
+	EFI_FIRMWARE_ERROR_DATA *firmware_error =
+		(EFI_FIRMWARE_ERROR_DATA *)section;
+	json_object *section_ir = json_object_new_object();
 
-    //Record type.
-    json_object* record_type = integer_to_readable_pair(firmware_error->ErrorType, 3,
-        FIRMWARE_ERROR_RECORD_TYPES_KEYS,
-        FIRMWARE_ERROR_RECORD_TYPES_VALUES,
-        "Unknown (Reserved)");
-    json_object_object_add(section_ir, "errorRecordType", record_type);
+	//Record type.
+	json_object *record_type = integer_to_readable_pair(
+		firmware_error->ErrorType, 3, FIRMWARE_ERROR_RECORD_TYPES_KEYS,
+		FIRMWARE_ERROR_RECORD_TYPES_VALUES, "Unknown (Reserved)");
+	json_object_object_add(section_ir, "errorRecordType", record_type);
 
-    //Revision, record identifier.
-    json_object_object_add(section_ir, "revision", json_object_new_int(firmware_error->Revision));
-    json_object_object_add(section_ir, "recordID", json_object_new_uint64(firmware_error->RecordId));
-    
-    //Record GUID.
-    char record_id_guid[GUID_STRING_LENGTH];
-    guid_to_string(record_id_guid, &firmware_error->RecordIdGuid);
-    json_object_object_add(section_ir, "recordIDGUID", json_object_new_string(record_id_guid));
+	//Revision, record identifier.
+	json_object_object_add(section_ir, "revision",
+			       json_object_new_int(firmware_error->Revision));
+	json_object_object_add(
+		section_ir, "recordID",
+		json_object_new_uint64(firmware_error->RecordId));
 
-    return section_ir;
+	//Record GUID.
+	char record_id_guid[GUID_STRING_LENGTH];
+	guid_to_string(record_id_guid, &firmware_error->RecordIdGuid);
+	json_object_object_add(section_ir, "recordIDGUID",
+			       json_object_new_string(record_id_guid));
+
+	return section_ir;
 }
 
 //Converts a single firmware CPER-JSON section into CPER binary, outputting to the given stream.
-void ir_section_firmware_to_cper(json_object* section, FILE* out)
+void ir_section_firmware_to_cper(json_object *section, FILE *out)
 {
-    EFI_FIRMWARE_ERROR_DATA* section_cper =
-        (EFI_FIRMWARE_ERROR_DATA*)calloc(1, sizeof(EFI_FIRMWARE_ERROR_DATA));
+	EFI_FIRMWARE_ERROR_DATA *section_cper =
+		(EFI_FIRMWARE_ERROR_DATA *)calloc(
+			1, sizeof(EFI_FIRMWARE_ERROR_DATA));
 
-    //Record fields.
-    section_cper->ErrorType = readable_pair_to_integer(json_object_object_get(section, "errorRecordType"));
-    section_cper->Revision = json_object_get_int(json_object_object_get(section, "revision"));
-    section_cper->RecordId = json_object_get_uint64(json_object_object_get(section, "recordID"));
-    string_to_guid(&section_cper->RecordIdGuid, 
-        json_object_get_string(json_object_object_get(section, "recordIDGUID")));
+	//Record fields.
+	section_cper->ErrorType = readable_pair_to_integer(
+		json_object_object_get(section, "errorRecordType"));
+	section_cper->Revision = json_object_get_int(
+		json_object_object_get(section, "revision"));
+	section_cper->RecordId = json_object_get_uint64(
+		json_object_object_get(section, "recordID"));
+	string_to_guid(&section_cper->RecordIdGuid,
+		       json_object_get_string(json_object_object_get(
+			       section, "recordIDGUID")));
 
-    //Write to stream, free resources.
-    fwrite(section_cper, sizeof(EFI_FIRMWARE_ERROR_DATA), 1, out);
-    fflush(out);
-    free(section_cper);
+	//Write to stream, free resources.
+	fwrite(section_cper, sizeof(EFI_FIRMWARE_ERROR_DATA), 1, out);
+	fflush(out);
+	free(section_cper);
 }
\ No newline at end of file
