From 90f8da28bf6fcd33866b9d92df024d7793910c07 Mon Sep 17 00:00:00 2001 From: C-3PO Date: Sun, 7 Oct 2018 20:00:31 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20Rename=20variables=20to=20use=20?= =?UTF-8?q?camelCase?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/utils/decryptUtilities.c | 7 ++++--- src/utils/fileUtilities.c | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/utils/decryptUtilities.c b/src/utils/decryptUtilities.c index dab1b39..94b646c 100644 --- a/src/utils/decryptUtilities.c +++ b/src/utils/decryptUtilities.c @@ -1,6 +1,7 @@ #include "decryptUtilities.h" -const uint32_t crc32_tab[] = { +/** Table of all 256 CRC-32 values */ +const uint32_t crcTable[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c2b, 0x7eb17cbd, 0xe7b82d07, 0x90bf1d91, 0x1db71064, 0x6ab020f2, @@ -46,8 +47,8 @@ const uint32_t crc32_tab[] = { 0xb40bbe37, 0xc30c8ea1, 0x5a05df1b, 0x2d02ef8d }; -uint32_t getCrc(uint32_t old_crc, uint8_t c) { -return (old_crc >> 8) ^ crc32_tab[(old_crc & (uint32_t)0xff) ^ c]; +uint32_t getCrc(uint32_t oldCrc, uint8_t c) { +return (oldCrc >> 8) ^ crcTable[(oldCrc & (uint32_t)0xff) ^ c]; } void updateKeys(uint32_t *key_0, uint32_t *key_1, uint32_t *key_2, uint8_t c) { diff --git a/src/utils/fileUtilities.c b/src/utils/fileUtilities.c index a75ee5d..2c9a917 100644 --- a/src/utils/fileUtilities.c +++ b/src/utils/fileUtilities.c @@ -45,7 +45,7 @@ void closeCurrentFile() { //Opens the next file at its beginning. void openNextFile() { const size_t fileNameLength = strlen(file.name); - //We need to transfer carry if necessary (e.g. .z09 to .z10), otherwise just increase last digit + //Transfer carry if necessary (e.g. .z09 to .z10), otherwise just increase last digit if (file.name[fileNameLength - 1] == '9') { file.name[fileNameLength - 2] += 1; file.name[fileNameLength - 1] = '0';