From 63d68bd657b7386c9c58b4439a100ea0ccbd633e Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 29 Nov 2023 16:22:09 -0300 Subject: Comments detailing the ages for generational GC Plus other comments and small details. --- lauxlib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'lauxlib.c') diff --git a/lauxlib.c b/lauxlib.c index 927e36f0..ab3c7c93 100644 --- a/lauxlib.c +++ b/lauxlib.c @@ -1139,12 +1139,11 @@ static unsigned int luai_makeseed (void) { unsigned int res; unsigned int i; time_t t = time(NULL); - void *h = buff; char *b = (char*)buff; - addbuff(b, h); /* local variable's address */ + addbuff(b, b); /* local variable's address */ addbuff(b, t); /* time */ /* fill (rare but possible) remain of the buffer with zeros */ - memset(b, 0, BUFSEED * sizeof(int) - BUFSEEDB); + memset(b, 0, sizeof(buff) - BUFSEEDB); res = buff[0]; for (i = 0; i < BUFSEED; i++) res ^= (res >> 3) + (res << 7) + buff[i]; -- cgit v1.2.3-55-g6feb