mirror of
https://github.com/hashcat/hashcat.git
synced 2024-12-25 07:58:19 +00:00
Fix cppcheck warnings
This commit is contained in:
parent
1eab457963
commit
f5f17997b2
@ -551,10 +551,14 @@ static int mp_setup_usr (hashcat_ctx_t *hashcat_ctx, cs_t *mp_sys, cs_t *mp_usr,
|
||||
{
|
||||
event_log_error (hashcat_ctx, "%s: Custom charset file is too large", buf);
|
||||
|
||||
fclose (fp);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
else
|
||||
{
|
||||
fclose (fp);
|
||||
}
|
||||
|
||||
if (nread == 0)
|
||||
{
|
||||
|
11
src/opencl.c
11
src/opencl.c
@ -62,7 +62,16 @@ static int ocl_check_dri (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx)
|
||||
|
||||
u32 vendor = 0;
|
||||
|
||||
if (fscanf (fd_drm, "0x%x", &vendor) != 1) return 0;
|
||||
if (fscanf (fd_drm, "0x%x", &vendor) != 1)
|
||||
{
|
||||
fclose (fd_drm);
|
||||
|
||||
return 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
fclose (fd_drm);
|
||||
}
|
||||
|
||||
if (vendor != 4098) return 0;
|
||||
|
||||
|
@ -1637,7 +1637,7 @@ char *status_get_hwmon_dev (const hashcat_ctx_t *hashcat_ctx, const int device_i
|
||||
}
|
||||
else
|
||||
{
|
||||
output_len = snprintf (output_buf, HCBUFSIZ_TINY - 1, "N/A");
|
||||
snprintf (output_buf, HCBUFSIZ_TINY - 1, "N/A");
|
||||
}
|
||||
|
||||
hc_thread_mutex_unlock (status_ctx->mux_hwmon);
|
||||
|
Loading…
Reference in New Issue
Block a user