From dc170907edfc9c04537a5d7e8e68a83c4d257e08 Mon Sep 17 00:00:00 2001 From: jsteube Date: Sun, 26 Feb 2017 15:48:14 +0100 Subject: [PATCH] Compress multiple newlines to one in host code, too --- include/ext_nvml.h | 1 - include/ext_xnvctrl.h | 1 - include/lzma_sdk/7zTypes.h | 2 -- include/lzma_sdk/Lzma2Dec.h | 2 -- include/lzma_sdk/LzmaDec.h | 6 ------ include/sort_r.h | 1 - src/filehandling.c | 1 - src/hashcat.c | 1 - src/interface.c | 3 --- src/lzma_sdk/Alloc.c | 2 -- src/lzma_sdk/LzmaDec.c | 3 --- src/user_options.c | 1 - 12 files changed, 24 deletions(-) diff --git a/include/ext_nvml.h b/include/ext_nvml.h index a511fba21..bfc8da6af 100644 --- a/include/ext_nvml.h +++ b/include/ext_nvml.h @@ -161,7 +161,6 @@ typedef enum nvmlGom_enum * */ #define nvmlClocksThrottleReasonNone 0x0000000000000000LL - /* * End of declarations from nvml.h **/ diff --git a/include/ext_xnvctrl.h b/include/ext_xnvctrl.h index 0338ebbfa..b63a73bc1 100644 --- a/include/ext_xnvctrl.h +++ b/include/ext_xnvctrl.h @@ -40,7 +40,6 @@ typedef int (*XCLOSEDISPLAY) (void *); #define NV_CTRL_PCI_DEVICE 240 /* R--GI */ - /* * NV_CTRL_PCI_FUNCTION - Returns the PCI function number the specified device * is using. diff --git a/include/lzma_sdk/7zTypes.h b/include/lzma_sdk/7zTypes.h index 778413ef4..d32c615e6 100644 --- a/include/lzma_sdk/7zTypes.h +++ b/include/lzma_sdk/7zTypes.h @@ -97,7 +97,6 @@ typedef int Bool; #define True 1 #define False 0 - #ifdef _WIN32 #define MY_STD_CALL __stdcall #else @@ -123,7 +122,6 @@ typedef int Bool; #endif - /* The following interfaces use first parameter as pointer to structure */ typedef struct diff --git a/include/lzma_sdk/Lzma2Dec.h b/include/lzma_sdk/Lzma2Dec.h index e6a0f6ed6..71eff0286 100644 --- a/include/lzma_sdk/Lzma2Dec.h +++ b/include/lzma_sdk/Lzma2Dec.h @@ -30,7 +30,6 @@ SRes Lzma2Dec_AllocateProbs(CLzma2Dec *p, Byte prop, ISzAlloc *alloc); SRes Lzma2Dec_Allocate(CLzma2Dec *p, Byte prop, ISzAlloc *alloc); void Lzma2Dec_Init(CLzma2Dec *p); - /* finishMode: It has meaning only if the decoding reaches output limit (*destLen or dicLimit). @@ -52,7 +51,6 @@ SRes Lzma2Dec_DecodeToDic(CLzma2Dec *p, SizeT dicLimit, SRes Lzma2Dec_DecodeToBuf(CLzma2Dec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); - /* ---------- One Call Interface ---------- */ /* diff --git a/include/lzma_sdk/LzmaDec.h b/include/lzma_sdk/LzmaDec.h index bb557e337..9ea53c589 100644 --- a/include/lzma_sdk/LzmaDec.h +++ b/include/lzma_sdk/LzmaDec.h @@ -18,7 +18,6 @@ EXTERN_C_BEGIN #define CLzmaProb UInt16 #endif - /* ---------- LZMA Properties ---------- */ #define LZMA_PROPS_SIZE 5 @@ -37,7 +36,6 @@ Returns: SRes LzmaProps_Decode(CLzmaProps *p, const Byte *data, unsigned size); - /* ---------- LZMA Decoder state ---------- */ /* LZMA_REQUIRED_INPUT_MAX = number of required input bytes for worst case. @@ -106,7 +104,6 @@ typedef enum /* ELzmaStatus is used only as output value for function call */ - /* ---------- Interfaces ---------- */ /* There are 3 levels of interfaces: @@ -116,7 +113,6 @@ typedef enum You can select any of these interfaces, but don't mix functions from different groups for same object. */ - /* There are two variants to allocate state for Dictionary Interface: 1) LzmaDec_Allocate / LzmaDec_Free 2) LzmaDec_AllocateProbs / LzmaDec_FreeProbs @@ -179,7 +175,6 @@ Returns: SRes LzmaDec_DecodeToDic(CLzmaDec *p, SizeT dicLimit, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); - /* ---------- Buffer Interface ---------- */ /* It's zlib-like interface. @@ -196,7 +191,6 @@ finishMode: SRes LzmaDec_DecodeToBuf(CLzmaDec *p, Byte *dest, SizeT *destLen, const Byte *src, SizeT *srcLen, ELzmaFinishMode finishMode, ELzmaStatus *status); - /* ---------- One Call Interface ---------- */ /* LzmaDecode diff --git a/include/sort_r.h b/include/sort_r.h index f8bdf50ff..6818ac31e 100644 --- a/include/sort_r.h +++ b/include/sort_r.h @@ -119,7 +119,6 @@ static _SORT_R_INLINE void sort_r_simple(void *base, size_t nel, size_t w, } } - #if defined NESTED_QSORT static _SORT_R_INLINE void sort_r(void *base, size_t nel, size_t width, diff --git a/src/filehandling.c b/src/filehandling.c index 44a482cfc..751a81c09 100644 --- a/src/filehandling.c +++ b/src/filehandling.c @@ -82,7 +82,6 @@ int fgetl (FILE *fp, char *line_buf) return (line_len); } - size_t superchop_with_length (char *buf, const size_t len) { size_t new_len = len; diff --git a/src/hashcat.c b/src/hashcat.c index 67d1f67e4..29c393994 100644 --- a/src/hashcat.c +++ b/src/hashcat.c @@ -615,7 +615,6 @@ static int outer_loop (hashcat_ctx_t *hashcat_ctx) EVENT (EVENT_OUTERLOOP_MAINSCREEN); - /** * Tell user about cracked hashes by potfile */ diff --git a/src/interface.c b/src/interface.c index 7981f9461..4950412b3 100644 --- a/src/interface.c +++ b/src/interface.c @@ -11358,7 +11358,6 @@ int seven_zip_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_ data_buf_len = input_len - 1 - 2 - 1 - data_type_len - 1 - NumCyclesPower_len - 1 - salt_len_len - 1 - salt_buf_len - 1 - iv_len_len - 1 - iv_buf_len - 1 - crc_buf_len - 1 - data_len_len - 1 - unpack_size_len - 1; } - const u32 iter = atoll ((const char *) NumCyclesPower_pos); const u32 crc = atoll ((const char *) crc_buf_pos); const u32 data_type = atoll ((const char *) data_type_pos); @@ -11382,7 +11381,6 @@ int seven_zip_parse_hash (u8 *input_buf, u32 input_len, hash_t *hash_buf, MAYBE_ crc_len = atoll ((const char *) crc_len_pos); } - /** * verify some data */ @@ -22767,7 +22765,6 @@ void hashconfig_benchmark_defaults (hashcat_ctx_t *hashcat_ctx, salt_t *salt, vo } } - // set default iterations switch (hashconfig->hash_mode) diff --git a/src/lzma_sdk/Alloc.c b/src/lzma_sdk/Alloc.c index 3f6ac4191..b6158b89e 100644 --- a/src/lzma_sdk/Alloc.c +++ b/src/lzma_sdk/Alloc.c @@ -91,7 +91,6 @@ void SetLargePageSize() #endif } - void *BigAlloc(size_t size) { if (size == 0) @@ -126,7 +125,6 @@ void BigFree(void *address) #endif - static void *SzAlloc(void *p, size_t size) { UNUSED_VAR(p); return MyAlloc(size); } static void SzFree(void *p, void *address) { UNUSED_VAR(p); MyFree(address); } ISzAlloc g_Alloc = { SzAlloc, SzFree }; diff --git a/src/lzma_sdk/LzmaDec.c b/src/lzma_sdk/LzmaDec.c index 12dce11fb..72bd1095a 100644 --- a/src/lzma_sdk/LzmaDec.c +++ b/src/lzma_sdk/LzmaDec.c @@ -65,7 +65,6 @@ #define TREE_DECODE_CHECK(probs, limit, i) \ { i = 1; do { GET_BIT_CHECK(probs + i, i) } while (i < limit); i -= limit; } - #define kNumPosBitsMax 4 #define kNumPosStatesMax (1 << kNumPosBitsMax) @@ -83,7 +82,6 @@ #define LenHigh (LenMid + (kNumPosStatesMax << kLenNumMidBits)) #define kNumLenProbs (LenHigh + kLenNumHighSymbols) - #define kNumStates 12 #define kNumLitStates 7 @@ -765,7 +763,6 @@ static ELzmaDummy LzmaDec_TryDummy(const CLzmaDec *p, const Byte *buf, SizeT inS return res; } - void LzmaDec_InitDicAndState(CLzmaDec *p, Bool initDic, Bool initState) { p->needFlush = 1; diff --git a/src/user_options.c b/src/user_options.c index baf982565..4de6a58f2 100644 --- a/src/user_options.c +++ b/src/user_options.c @@ -693,7 +693,6 @@ int user_options_sanity (hashcat_ctx_t *hashcat_ctx) } } - if (user_options->debug_mode > 0) { if (user_options->attack_mode != ATTACK_MODE_STRAIGHT)