All of lore.kernel.org
 help / color / mirror / Atom feed
* main - cov: hide problem with 64bit time_t
@ 2023-05-06 20:46 Zdenek Kabelac
  0 siblings, 0 replies; only message in thread
From: Zdenek Kabelac @ 2023-05-06 20:46 UTC (permalink / raw)
  To: lvm-devel

Gitweb:        https://sourceware.org/git/?p=lvm2.git;a=commitdiff;h=4fd2f433ad7d49b404a897c64191826e7b3c9f4c
Commit:        4fd2f433ad7d49b404a897c64191826e7b3c9f4c
Parent:        242bf56413f67dc3dd16770d420ced06eed0c4be
Author:        Zdenek Kabelac <zkabelac@redhat.com>
AuthorDate:    Wed Apr 26 14:05:12 2023 +0200
Committer:     Zdenek Kabelac <zkabelac@redhat.com>
CommitterDate: Sat May 6 19:22:05 2023 +0200

cov: hide problem with 64bit time_t

---
 lib/commands/toolcontext.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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);
 }
 


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2023-05-06 20:46 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-06 20:46 main - cov: hide problem with 64bit time_t Zdenek Kabelac

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.