1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-26 09:58:16 +00:00

Change 0/1 to true/false

Found with clang-tidy
This commit is contained in:
Rosen Penev 2019-09-09 17:52:08 -07:00
parent 7f4df9ebff
commit bd6c0e57e4
7 changed files with 18 additions and 18 deletions

View File

@ -199,7 +199,7 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
u32 kernel_loops_max_reduced = kernel_loops_max; u32 kernel_loops_max_reduced = kernel_loops_max;
if (1) if (true)
{ {
double exec_msec = try_run (hashcat_ctx, device_param, kernel_accel_min, kernel_loops_min); double exec_msec = try_run (hashcat_ctx, device_param, kernel_accel_min, kernel_loops_min);

View File

@ -458,7 +458,7 @@ int folder_config_init (hashcat_ctx_t *hashcat_ctx, MAYBE_UNUSED const char *ins
hcfree (cpath); hcfree (cpath);
//if (getenv ("TMP") == NULL) //if (getenv ("TMP") == NULL)
if (1) if (true)
{ {
char *tmp; char *tmp;

View File

@ -887,10 +887,10 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
hlfmt_hash (hashcat_ctx, hashlist_format, input_buf, input_len, &hash_buf, &hash_len); hlfmt_hash (hashcat_ctx, hashlist_format, input_buf, input_len, &hash_buf, &hash_len);
bool hash_fmt_error = 0; bool hash_fmt_error = false;
if (hash_len < 1) hash_fmt_error = 1; if (hash_len < 1) hash_fmt_error = true;
if (hash_buf == NULL) hash_fmt_error = 1; if (hash_buf == NULL) hash_fmt_error = true;
if (hash_fmt_error) if (hash_fmt_error)
{ {
@ -1034,10 +1034,10 @@ int hashes_init_stage1 (hashcat_ctx_t *hashcat_ctx)
hlfmt_hash (hashcat_ctx, hashlist_format, line_buf, line_len, &hash_buf, &hash_len); hlfmt_hash (hashcat_ctx, hashlist_format, line_buf, line_len, &hash_buf, &hash_len);
bool hash_fmt_error = 0; bool hash_fmt_error = false;
if (hash_len < 1) hash_fmt_error = 1; if (hash_len < 1) hash_fmt_error = true;
if (hash_buf == NULL) hash_fmt_error = 1; if (hash_buf == NULL) hash_fmt_error = true;
if (hash_fmt_error) if (hash_fmt_error)
{ {

View File

@ -2557,7 +2557,7 @@ int hwmon_ctx_init (hashcat_ctx_t *hashcat_ctx)
if (hwmon_ctx->hm_sysfs) if (hwmon_ctx->hm_sysfs)
{ {
if (1) if (true)
{ {
int hm_adapters_id = 0; int hm_adapters_id = 0;

View File

@ -247,7 +247,7 @@ void potfile_write_append (hashcat_ctx_t *hashcat_ctx, const char *out_buf, cons
int tmp_len = 0; int tmp_len = 0;
if (1) if (true)
{ {
memcpy (tmp_buf + tmp_len, out_buf, out_len); memcpy (tmp_buf + tmp_len, out_buf, out_len);

View File

@ -35,7 +35,7 @@ void slow_candidates_seek (hashcat_ctx_t *hashcat_ctx, void *extra_info, const u
char *line_buf = NULL; char *line_buf = NULL;
u32 line_len = 0; u32 line_len = 0;
while (1) while (true)
{ {
HCFILE *fp = &extra_info_straight->fp; HCFILE *fp = &extra_info_straight->fp;
@ -86,7 +86,7 @@ void slow_candidates_seek (hashcat_ctx_t *hashcat_ctx, void *extra_info, const u
char *line_buf = NULL; char *line_buf = NULL;
u32 line_len = 0; u32 line_len = 0;
while (1) while (true)
{ {
get_next_word (hashcat_ctx, base_fp, &line_buf, &line_len); get_next_word (hashcat_ctx, base_fp, &line_buf, &line_len);
@ -121,7 +121,7 @@ void slow_candidates_seek (hashcat_ctx_t *hashcat_ctx, void *extra_info, const u
char *line_buf = extra_info_combi->scratch_buf; char *line_buf = extra_info_combi->scratch_buf;
u32 line_len = 0; u32 line_len = 0;
while (1) while (true)
{ {
line_len = (u32) fgetl (combs_fp, line_buf, HCBUFSIZ_LARGE); line_len = (u32) fgetl (combs_fp, line_buf, HCBUFSIZ_LARGE);
@ -174,7 +174,7 @@ void slow_candidates_next (hashcat_ctx_t *hashcat_ctx, void *extra_info)
char *line_buf = NULL; char *line_buf = NULL;
u32 line_len = 0; u32 line_len = 0;
while (1) while (true)
{ {
HCFILE *fp = &extra_info_straight->fp; HCFILE *fp = &extra_info_straight->fp;
@ -246,7 +246,7 @@ void slow_candidates_next (hashcat_ctx_t *hashcat_ctx, void *extra_info)
char *line_buf = NULL; char *line_buf = NULL;
u32 line_len = 0; u32 line_len = 0;
while (1) while (true)
{ {
get_next_word (hashcat_ctx, base_fp, &line_buf, &line_len); get_next_word (hashcat_ctx, base_fp, &line_buf, &line_len);
@ -284,7 +284,7 @@ void slow_candidates_next (hashcat_ctx_t *hashcat_ctx, void *extra_info)
char *line_buf = extra_info_combi->scratch_buf; char *line_buf = extra_info_combi->scratch_buf;
u32 line_len = 0; u32 line_len = 0;
while (1) while (true)
{ {
line_len = (u32) fgetl (combs_fp, line_buf, HCBUFSIZ_LARGE); line_len = (u32) fgetl (combs_fp, line_buf, HCBUFSIZ_LARGE);

View File

@ -555,7 +555,7 @@ void example_hashes (hashcat_ctx_t *hashcat_ctx)
{ {
event_log_info (hashcat_ctx, "HASH: %s", hashconfig->st_hash); event_log_info (hashcat_ctx, "HASH: %s", hashconfig->st_hash);
if (need_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), user_options->separator, 0)) if (need_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), user_options->separator, false))
{ {
char tmp_buf[HCBUFSIZ_LARGE] = { 0 }; char tmp_buf[HCBUFSIZ_LARGE] = { 0 };
@ -615,7 +615,7 @@ void example_hashes (hashcat_ctx_t *hashcat_ctx)
{ {
event_log_info (hashcat_ctx, "HASH: %s", hashconfig->st_hash); event_log_info (hashcat_ctx, "HASH: %s", hashconfig->st_hash);
if (need_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), user_options->separator, 0)) if (need_hexify ((const u8 *) hashconfig->st_pass, strlen (hashconfig->st_pass), user_options->separator, false))
{ {
char tmp_buf[HCBUFSIZ_LARGE] = { 0 }; char tmp_buf[HCBUFSIZ_LARGE] = { 0 };