mirror of
https://github.com/hashcat/hashcat.git
synced 2025-03-26 20:35:41 +00:00
Moved datatype from double to u32 in autotune.c as this makes no difference
This commit is contained in:
parent
afa3326330
commit
b2dbd22979
@ -235,17 +235,17 @@ static int autotune (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const double exec_left = target_msec / exec_msec_pre_final;
|
const u32 exec_left = target_msec / exec_msec_pre_final;
|
||||||
|
|
||||||
const double accel_left = kernel_accel_max / kernel_accel;
|
const u32 accel_left = kernel_accel_max / kernel_accel;
|
||||||
|
|
||||||
const double exec_accel_min = MIN (exec_left, accel_left); // we want that to be int
|
const u32 exec_accel_min = MIN (exec_left, accel_left); // we want that to be int
|
||||||
|
|
||||||
if (exec_accel_min >= 1.0)
|
if (exec_accel_min >= 1)
|
||||||
{
|
{
|
||||||
// this is safe to not overflow kernel_accel_max because of accel_left
|
// this is safe to not overflow kernel_accel_max because of accel_left
|
||||||
|
|
||||||
kernel_accel *= (u32) exec_accel_min;
|
kernel_accel *= exec_accel_min;
|
||||||
}
|
}
|
||||||
|
|
||||||
// reset them fake words
|
// reset them fake words
|
||||||
|
Loading…
Reference in New Issue
Block a user