]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: randgen - Init seed to 0
authorAki Tuomi <aki.tuomi@dovecot.fi>
Thu, 8 Feb 2018 09:56:08 +0000 (11:56 +0200)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 14 Feb 2019 09:38:16 +0000 (11:38 +0200)
Satisfies static analyzer, the seed is guaranteed to get
filled with random data.

src/lib/randgen.c

index ffb9c79b21bafbf8611571c67a0d4b183319e0be..6a8d30bc36d311af7181c5605e4fbde6269c00ae 100644 (file)
@@ -140,7 +140,8 @@ void random_fill(void *buf, size_t size)
 
 void random_init(void)
 {
-       unsigned int seed;
+       /* static analyzer seems to require this */
+       unsigned int seed = 0;
        const char *env_seed;
 
        if (init_refcount++ > 0)