diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/entropy/cryptoapi_rng/es_capi.cpp | 4 | ||||
-rw-r--r-- | src/lib/entropy/dev_random/dev_random.cpp | 4 | ||||
-rw-r--r-- | src/lib/entropy/egd/es_egd.cpp | 4 | ||||
-rw-r--r-- | src/lib/entropy/proc_walk/proc_walk.cpp | 4 | ||||
-rw-r--r-- | src/lib/entropy/unix_procs/unix_procs.cpp | 4 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/lib/entropy/cryptoapi_rng/es_capi.cpp b/src/lib/entropy/cryptoapi_rng/es_capi.cpp index 2c86152ad..019b55a10 100644 --- a/src/lib/entropy/cryptoapi_rng/es_capi.cpp +++ b/src/lib/entropy/cryptoapi_rng/es_capi.cpp @@ -63,9 +63,9 @@ void Win32_CAPI_EntropySource::poll(Entropy_Accumulator& accum) { CSP_Handle csp(prov_types[i]); - if(size_t got = csp.gen_random(&m_buf[0], m_buf.size())) + if(size_t got = csp.gen_random(m_buf.data(), m_buf.size())) { - accum.add(&m_buf[0], got, 6); + accum.add(m_buf.data(), got, 6); break; } } diff --git a/src/lib/entropy/dev_random/dev_random.cpp b/src/lib/entropy/dev_random/dev_random.cpp index b115e0da2..526835fea 100644 --- a/src/lib/entropy/dev_random/dev_random.cpp +++ b/src/lib/entropy/dev_random/dev_random.cpp @@ -87,9 +87,9 @@ void Device_EntropySource::poll(Entropy_Accumulator& accum) { if(FD_ISSET(m_devices[i], &read_set)) { - const ssize_t got = ::read(m_devices[i], &m_buf[0], m_buf.size()); + const ssize_t got = ::read(m_devices[i], m_buf.data(), m_buf.size()); if(got > 0) - accum.add(&m_buf[0], got, ENTROPY_BITS_PER_BYTE); + accum.add(m_buf.data(), got, ENTROPY_BITS_PER_BYTE); } } } diff --git a/src/lib/entropy/egd/es_egd.cpp b/src/lib/entropy/egd/es_egd.cpp index 728104b44..d64b87ba1 100644 --- a/src/lib/entropy/egd/es_egd.cpp +++ b/src/lib/entropy/egd/es_egd.cpp @@ -145,11 +145,11 @@ void EGD_EntropySource::poll(Entropy_Accumulator& accum) for(size_t i = 0; i != sockets.size(); ++i) { - size_t got = sockets[i].read(&m_buf[0], m_buf.size()); + size_t got = sockets[i].read(m_buf.data(), m_buf.size()); if(got) { - accum.add(&m_buf[0], got, 6); + accum.add(m_buf.data(), got, 6); break; } } diff --git a/src/lib/entropy/proc_walk/proc_walk.cpp b/src/lib/entropy/proc_walk/proc_walk.cpp index 1501f0774..217ed5a52 100644 --- a/src/lib/entropy/proc_walk/proc_walk.cpp +++ b/src/lib/entropy/proc_walk/proc_walk.cpp @@ -133,11 +133,11 @@ void ProcWalking_EntropySource::poll(Entropy_Accumulator& accum) break; } - ssize_t got = ::read(fd, &m_buf[0], m_buf.size()); + ssize_t got = ::read(fd, m_buf.data(), m_buf.size()); ::close(fd); if(got > 0) - accum.add(&m_buf[0], got, ENTROPY_ESTIMATE); + accum.add(m_buf.data(), got, ENTROPY_ESTIMATE); if(accum.polling_finished()) break; diff --git a/src/lib/entropy/unix_procs/unix_procs.cpp b/src/lib/entropy/unix_procs/unix_procs.cpp index d3208b7fc..3c641da70 100644 --- a/src/lib/entropy/unix_procs/unix_procs.cpp +++ b/src/lib/entropy/unix_procs/unix_procs.cpp @@ -237,9 +237,9 @@ void Unix_EntropySource::poll(Entropy_Accumulator& accum) if(FD_ISSET(fd, &read_set)) { - const ssize_t got = ::read(fd, &m_buf[0], m_buf.size()); + const ssize_t got = ::read(fd, m_buf.data(), m_buf.size()); if(got > 0) - accum.add(&m_buf[0], got, ENTROPY_ESTIMATE); + accum.add(m_buf.data(), got, ENTROPY_ESTIMATE); else proc.spawn(next_source()); } |