1
0
mirror of https://github.com/hashcat/hashcat.git synced 2025-06-19 14:38:51 +00:00

Merge pull request #178 from gm4tr1x/missing-field-initializers-warnings

Fixed gcc warnings about missing field initializers
This commit is contained in:
Jens Steube 2016-01-30 15:58:34 +01:00
commit a6ef1e5356

View File

@ -2630,7 +2630,9 @@ char *logfile_generate_subid ()
#if F_SETLKW #if F_SETLKW
void lock_file (FILE *fp) void lock_file (FILE *fp)
{ {
struct flock lock = { 0 }; struct flock lock;
memset (&lock, 0, sizeof (struct flock));
lock.l_type = F_WRLCK; lock.l_type = F_WRLCK;
while (fcntl(fileno(fp), F_SETLKW, &lock)) while (fcntl(fileno(fp), F_SETLKW, &lock))
@ -2646,7 +2648,9 @@ void lock_file (FILE *fp)
void unlock_file (FILE *fp) void unlock_file (FILE *fp)
{ {
struct flock lock = { 0 }; struct flock lock;
memset (&lock, 0, sizeof (struct flock));
lock.l_type = F_UNLCK; lock.l_type = F_UNLCK;
fcntl(fileno(fp), F_SETLK, &lock); fcntl(fileno(fp), F_SETLK, &lock);