1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-11-22 16:18:09 +00:00

logfile: Use struct directly instead of casting.

Gets rid of a clang warning
This commit is contained in:
Rosen Penev 2017-11-04 23:33:06 -07:00
parent 4165f94e51
commit 2a56a229fa

View File

@ -17,11 +17,11 @@ void logfile_generate_topid (hashcat_ctx_t *hashcat_ctx)
if (logfile_ctx->enabled == false) return;
u32 v[4];
struct timeval v;
gettimeofday ((struct timeval *) v, NULL);
gettimeofday (&v, NULL);
snprintf (logfile_ctx->topid, 40, "TOP.%08x.%08x", v[0], v[2]);
snprintf (logfile_ctx->topid, 40, "TOP.%08x.%08x", (u32) v.tv_sec, (u32) v.tv_usec);
}
void logfile_generate_subid (hashcat_ctx_t *hashcat_ctx)
@ -30,11 +30,11 @@ void logfile_generate_subid (hashcat_ctx_t *hashcat_ctx)
if (logfile_ctx->enabled == false) return;
u32 v[4];
struct timeval v;
gettimeofday ((struct timeval *) v, NULL);
gettimeofday (&v, NULL);
snprintf (logfile_ctx->subid, 40, "SUB.%08x.%08x", v[0], v[2]);
snprintf (logfile_ctx->subid, 40, "SUB.%08x.%08x", (u32) v.tv_sec, (u32) v.tv_usec);
}
void logfile_append (hashcat_ctx_t *hashcat_ctx, const char *fmt, ...)