summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2023-04-26 14:05:12 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2023-05-06 19:22:05 +0200
commit4fd2f433ad7d49b404a897c64191826e7b3c9f4c (patch)
tree5ee64a7f5e52b299f34be66fdd55a3158c487e8a
parent242bf56413f67dc3dd16770d420ced06eed0c4be (diff)
downloadlvm2-4fd2f433ad7d49b404a897c64191826e7b3c9f4c.tar.gz
cov: hide problem with 64bit time_t
-rw-r--r--lib/commands/toolcontext.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/commands/toolcontext.c b/lib/commands/toolcontext.c
index 4e05f9078..22563528e 100644
--- a/lib/commands/toolcontext.c
+++ b/lib/commands/toolcontext.c
@@ -1506,7 +1506,7 @@ static void _init_rand(struct cmd_context *cmd)
return;
}
- cmd->rand_seed = (unsigned) time(NULL) + (unsigned) getpid();
+ cmd->rand_seed = (unsigned) ((time(NULL) + getpid()) & 0xffffffff);
reset_lvm_errno(1);
}