diff options
author | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2005-09-05 21:43:43 +0000 |
---|---|---|
committer | weidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0> | 2005-09-05 21:43:43 +0000 |
commit | 4e37f436f4425ce1c428f93bedd81bfdc4dc23f7 (patch) | |
tree | 7c9380467a43a9fd9b4095024796ccabfdce1280 /osrng.cpp | |
parent | 25699d1dcc22ac8aaa36d285e02959962e1b502c (diff) | |
download | cryptopp-4e37f436f4425ce1c428f93bedd81bfdc4dc23f7.tar.gz |
port to GCC 4
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@211 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'osrng.cpp')
-rw-r--r-- | osrng.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -126,8 +126,8 @@ void BlockingRng::GenerateBlock(byte *output, size_t size) { // on some systems /dev/random will block until all bytes // are available, on others it will returns immediately - int len = read(m_fd, output, STDMIN(size, (unsigned int)INT_MAX)); - if (len == -1) + ssize_t len = read(m_fd, output, size); + if (len < 0) throw OS_RNG_Err("read /dev/random"); size -= len; output += len; |