1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-01-11 16:21:12 +00:00

Merge pull request #981 from philsmd/master

log topid/subid should use u32 everywhere
This commit is contained in:
Jens Steube 2017-01-21 18:28:17 +01:00 committed by GitHub
commit eb7dd088d1

View File

@ -11,15 +11,15 @@
#include "locking.h"
#include "shared.h"
static int logfile_generate_id (void)
static u32 logfile_generate_id (void)
{
const int n = rand ();
const u32 n = (u32) rand ();
time_t t;
time (&t);
return t + n;
return (u32) t + n;
}
void logfile_generate_topid (hashcat_ctx_t *hashcat_ctx)
@ -28,9 +28,9 @@ void logfile_generate_topid (hashcat_ctx_t *hashcat_ctx)
if (logfile_ctx->enabled == false) return;
const int id = logfile_generate_id ();
const u32 id = logfile_generate_id ();
snprintf (logfile_ctx->topid, 1 + 16, "TOP%08x", (u32) id);
snprintf (logfile_ctx->topid, 1 + 16, "TOP%08x", id);
}
void logfile_generate_subid (hashcat_ctx_t *hashcat_ctx)
@ -39,9 +39,9 @@ void logfile_generate_subid (hashcat_ctx_t *hashcat_ctx)
if (logfile_ctx->enabled == false) return;
const int id = logfile_generate_id ();
const u32 id = logfile_generate_id ();
snprintf (logfile_ctx->subid, 1 + 16, "SUB%08x", (u32) id);
snprintf (logfile_ctx->subid, 1 + 16, "SUB%08x", id);
}
void logfile_append (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...)