]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
random-util: we don't intend to write to auxv, hence make it const
authorLennart Poettering <lennart@poettering.net>
Tue, 6 Nov 2018 11:08:07 +0000 (12:08 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 6 Nov 2018 11:12:18 +0000 (12:12 +0100)
src/basic/random-util.c

index aa04cc2318535ace7a64d1072da5af40c995abc7..23951c01811cb1bca22023ec7ffc8ced8138149c 100644 (file)
@@ -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));