summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-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);
}