From: Lennart Poettering Date: Tue, 6 Nov 2018 11:08:07 +0000 (+0100) Subject: random-util: we don't intend to write to auxv, hence make it const X-Git-Tag: v240~400^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=54bf23151f1730cfc69cd06bec4589c768ab3d67;p=thirdparty%2Fsystemd.git random-util: we don't intend to write to auxv, hence make it const --- diff --git a/src/basic/random-util.c b/src/basic/random-util.c index aa04cc23185..23951c01811 100644 --- a/src/basic/random-util.c +++ b/src/basic/random-util.c @@ -142,7 +142,7 @@ void initialize_srand(void) { static bool srand_called = false; unsigned x; #if HAVE_SYS_AUXV_H - void *auxv; + const void *auxv; #endif if (srand_called) @@ -153,7 +153,7 @@ void initialize_srand(void) { * try to make use of that to seed the pseudo-random generator. It's * better than nothing... */ - auxv = (void*) getauxval(AT_RANDOM); + auxv = (const void*) getauxval(AT_RANDOM); if (auxv) { assert_cc(sizeof(x) <= 16); memcpy(&x, auxv, sizeof(x));