Skip to content

Commit

Permalink
main: prevent uninitialized value when using struct flock
Browse files Browse the repository at this point in the history
  • Loading branch information
nikias authored and olunx committed Apr 4, 2014
1 parent eef0495 commit 110b5f3
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -459,6 +459,7 @@ int main(int argc, char *argv[])
lock.l_whence = SEEK_SET;
lock.l_start = 0;
lock.l_len = 0;
lock.l_pid = 0;
fcntl(lfd, F_GETLK, &lock);
close(lfd);
if (lock.l_type != F_UNLCK) {
Expand Down

0 comments on commit 110b5f3

Please sign in to comment.