Merge pull request #581 from neheb/master

A few fixes
pull/583/head
Jens Steube 8 years ago committed by GitHub
commit e598283287

@ -457,7 +457,7 @@ int base32_encode (u8 (*f) (const u8), const u8 *in_buf, int in_len, u8 *out_buf
out_ptr += 8;
}
int out_len = (int) (((0.5f + (double) in_len) * 8) / 5); // ceil (in_len * 8 / 5)
int out_len = (int) (((0.5 + in_len) * 8) / 5); // ceil (in_len * 8 / 5)
while (out_len % 8)
{
@ -524,7 +524,7 @@ int base64_encode (u8 (*f) (const u8), const u8 *in_buf, int in_len, u8 *out_buf
out_ptr += 4;
}
int out_len = (int) (((0.5f + (double) in_len) * 8) / 6); // ceil (in_len * 8 / 6)
int out_len = (int) (((0.5 + in_len) * 8) / 6); // ceil (in_len * 8 / 6)
while (out_len % 4)
{

@ -8,6 +8,8 @@
#include "thread.h"
#include "event.h"
static int event_log (const char *fmt, va_list ap, char *s, const size_t sz) __attribute__ ((format (printf, 1, 0)));
void event_call (const u32 id, hashcat_ctx_t *hashcat_ctx, const void *buf, const size_t len)
{
event_ctx_t *event_ctx = hashcat_ctx->event_ctx;

@ -208,7 +208,7 @@ static int hm_SYSFS_set_fan_speed_target (hashcat_ctx_t *hashcat_ctx, const int
return -1;
}
val = (float) val * 2.55f; // should be pwm1_max
val = (int) (val * 2.55f); // should be pwm1_max
fprintf (fd, "%d", val);

@ -720,11 +720,11 @@ static void main_hashlist_parse_hash (MAYBE_UNUSED hashcat_ctx_t *hashcat_ctx, M
if (hashes_cnt < hashes_avail)
{
event_log_info_nn (hashcat_ctx, "Parsing Hashes: %u/%u (%0.2f%%)...", hashes_cnt, hashes_avail, ((double) hashes_cnt / hashes_avail) * 100.0f);
event_log_info_nn (hashcat_ctx, "Parsing Hashes: %u/%u (%0.2f%%)...", hashes_cnt, hashes_avail, ((double) hashes_cnt / hashes_avail) * 100.0);
}
else
{
event_log_info_nn (hashcat_ctx, "Parsed Hashes: %u/%u (%0.2f%%)", hashes_cnt, hashes_avail, 100.0f);
event_log_info_nn (hashcat_ctx, "Parsed Hashes: %u/%u (%0.2f%%)", hashes_cnt, hashes_avail, 100.0);
}
}

@ -193,9 +193,9 @@ static int monitor (hashcat_ctx_t *hashcat_ctx)
last_temp_check_time = temp_check_time;
float Kp = 1.8;
float Ki = 0.005;
float Kd = 6;
float Kp = 1.8f;
float Ki = 0.005f;
float Kd = 6.0f;
// PID controller (3-term controller: proportional - Kp, integral - Ki, derivative - Kd)

Loading…
Cancel
Save