From 8b42b1b184476fdd7cace7a23965a07fb3542d74 Mon Sep 17 00:00:00 2001 From: shchmue Date: Thu, 7 Mar 2019 11:06:32 -0500 Subject: [PATCH] Fix whitespace --- source/Common.cpp | 2 +- source/Key.cpp | 2 +- source/KeyLocation.cpp | 1 - source/mbedtls/lib/Makefile | 2 +- source/nx/es.c | 20 ++++++++++---------- source/sha256.c | 2 +- source/sha256_armv8.s | 2 +- 7 files changed, 15 insertions(+), 16 deletions(-) diff --git a/source/Common.cpp b/source/Common.cpp index f434e65..d0e5097 100644 --- a/source/Common.cpp +++ b/source/Common.cpp @@ -89,7 +89,7 @@ namespace Common { } glyph_index = FT_Get_Char_Index(face, (FT_ULong)str[i]); - + if (R_FAILED(FT_Load_Glyph(face, glyph_index, FT_LOAD_COLOR) || FT_Render_Glyph(face->glyph, FT_RENDER_MODE_NORMAL) != 0)) { diff --git a/source/Key.cpp b/source/Key.cpp index b874709..0145cb4 100644 --- a/source/Key.cpp +++ b/source/Key.cpp @@ -89,7 +89,7 @@ byte_vector Key::aes_decrypt_ctr(const byte_vector &data, byte_vector iv) { // used internally size_t nc_off = 0; u8 stream_block[0x10]; - + mbedtls_aes_context dec; mbedtls_aes_init(&dec); mbedtls_aes_setkey_enc(&dec, key.data(), length * 8); diff --git a/source/KeyLocation.cpp b/source/KeyLocation.cpp index 08d9883..8333187 100644 --- a/source/KeyLocation.cpp +++ b/source/KeyLocation.cpp @@ -82,7 +82,6 @@ void KeyLocation::get_from_memory(u64 tid, u8 seg_mask) { addr = mem_info.addr + mem_info.size; if (addr == 0) break; } - svcCloseHandle(debug_handle); } diff --git a/source/mbedtls/lib/Makefile b/source/mbedtls/lib/Makefile index 8e1af54..88c94fb 100644 --- a/source/mbedtls/lib/Makefile +++ b/source/mbedtls/lib/Makefile @@ -12,7 +12,7 @@ include $(DEVKITPRO)/libnx/switch_rules # Also see "include/mbedtls/config.h" ARCH := -march=armv8-a+crypto -mtune=cortex-a57 -mtp=soft -fPIE -CFLAGS := -g -Wall -O3 -ffunction-sections $(ARCH) $(DEFINES) +CFLAGS := -g -Wall -O3 -ffunction-sections $(ARCH) $(DEFINES) CFLAGS += -I ../include -D__SWITCH__ CXXFLAGS := $(CFLAGS) -fno-rtti -fno-exceptions -std=gnu++11 ASFLAGS := -g $(ARCH) diff --git a/source/nx/es.c b/source/nx/es.c index 6b19b15..0eb1a9a 100644 --- a/source/nx/es.c +++ b/source/nx/es.c @@ -57,7 +57,7 @@ Result esCountCommonTicket(u32 *num_tickets) } } - return rc; + return rc; } Result esCountPersonalizedTicket(u32 *num_tickets) @@ -94,23 +94,23 @@ Result esCountPersonalizedTicket(u32 *num_tickets) } } - return rc; + return rc; } Result esListCommonTicket(u32 *numRightsIdsWritten, NcmRightsId *outBuf, size_t bufSize) { IpcCommand c; ipcInitialize(&c); ipcAddRecvBuffer(&c, outBuf, bufSize, BufferType_Normal); - + struct { u64 magic; u64 cmd_id; } *raw; - + raw = ipcPrepareHeader(&c, sizeof(*raw)); raw->magic = SFCI_MAGIC; raw->cmd_id = 11; - + Result rc = serviceIpcDispatch(&g_esSrv); if (R_SUCCEEDED(rc)) { @@ -129,7 +129,7 @@ Result esListCommonTicket(u32 *numRightsIdsWritten, NcmRightsId *outBuf, size_t if (numRightsIdsWritten) *numRightsIdsWritten = resp->num_rights_ids_written; } } - + return rc; } @@ -137,16 +137,16 @@ Result esListPersonalizedTicket(u32 *numRightsIdsWritten, NcmRightsId *outBuf, s IpcCommand c; ipcInitialize(&c); ipcAddRecvBuffer(&c, outBuf, bufSize, BufferType_Normal); - + struct { u64 magic; u64 cmd_id; } *raw; - + raw = ipcPrepareHeader(&c, sizeof(*raw)); raw->magic = SFCI_MAGIC; raw->cmd_id = 12; - + Result rc = serviceIpcDispatch(&g_esSrv); if (R_SUCCEEDED(rc)) { @@ -165,6 +165,6 @@ Result esListPersonalizedTicket(u32 *numRightsIdsWritten, NcmRightsId *outBuf, s if (numRightsIdsWritten) *numRightsIdsWritten = resp->num_rights_ids_written; } } - + return rc; } \ No newline at end of file diff --git a/source/sha256.c b/source/sha256.c index e5dbfcf..01a1e27 100644 --- a/source/sha256.c +++ b/source/sha256.c @@ -19,7 +19,7 @@ extern "C" { #define unlikely(x) __builtin_expect(!!(x), 0) void sha256_block_data_order (uint32_t *ctx, const void *in, size_t num); - + int sha256_init(struct sha256_state *sctx) { sctx->state[0] = SHA256_H0; diff --git a/source/sha256_armv8.s b/source/sha256_armv8.s index db703fa..a9b9363 100644 --- a/source/sha256_armv8.s +++ b/source/sha256_armv8.s @@ -24,7 +24,7 @@ sha256_block_data_order: str q9, [sp, #32] str q10, [sp, #48] ld1 {v28.4s-v31.4s}, [x3], #64 - + .Lsha256loop: ld1 {v5.16b-v8.16b}, [x1], #64