1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-02-22 12:32:04 +00:00

Remove duplicate conditions

This commit is contained in:
Jukka Ojanen 2021-08-09 18:48:20 +03:00
parent 1d50a18a2b
commit 1edb649c1f

View File

@ -161,8 +161,6 @@ static int backend_ctx_find_alias_devices (hashcat_ctx_t *hashcat_ctx)
static bool is_same_device_type (const hc_device_param_t *src, const hc_device_param_t *dst)
{
if (strcmp (src->device_name, dst->device_name) != 0) return false;
if (src->is_cuda != dst->is_cuda) return false;
if (src->is_hip != dst->is_hip) return false;
if (src->is_opencl != dst->is_opencl) return false;
@ -5281,8 +5279,6 @@ int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, con
{
CUfunction cuda_function = NULL;
if (device_param->is_cuda == true)
{
switch (kern_run)
{
case KERN_RUN_1: cuda_function = device_param->cuda_function1; break;
@ -5303,7 +5299,6 @@ int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, con
}
if (hc_cuFuncSetAttribute (hashcat_ctx, cuda_function, CU_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES, dynamic_shared_mem) == -1) return -1;
}
if (kernel_threads == 0) kernel_threads = 1;
@ -5380,8 +5375,6 @@ int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, con
{
hipFunction_t hip_function = NULL;
if (device_param->is_hip == true)
{
switch (kern_run)
{
case KERN_RUN_1: hip_function = device_param->hip_function1; break;
@ -5402,7 +5395,6 @@ int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, con
}
//if (hc_hipFuncSetAttribute (hashcat_ctx, hip_function, HIP_FUNC_ATTRIBUTE_MAX_DYNAMIC_SHARED_SIZE_BYTES, dynamic_shared_mem) == -1) return -1;
}
if (kernel_threads == 0) kernel_threads = 1;
@ -5477,8 +5469,6 @@ int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, con
{
cl_kernel opencl_kernel = NULL;
if (device_param->is_opencl == true)
{
switch (kern_run)
{
case KERN_RUN_1: opencl_kernel = device_param->opencl_kernel1; break;
@ -5497,7 +5487,6 @@ int run_kernel (hashcat_ctx_t *hashcat_ctx, hc_device_param_t *device_param, con
case KERN_RUN_AUX3: opencl_kernel = device_param->opencl_kernel_aux3; break;
case KERN_RUN_AUX4: opencl_kernel = device_param->opencl_kernel_aux4; break;
}
}
for (u32 i = 0; i <= 23; i++)
{