diff options
author | jorton <jorton@13f79535-47bb-0310-9956-ffa450edef68> | 2002-12-13 22:40:33 +0000 |
---|---|---|
committer | jorton <jorton@13f79535-47bb-0310-9956-ffa450edef68> | 2002-12-13 22:40:33 +0000 |
commit | 2e708d7e28376c458c52fd6d9d49d90b33217c6b (patch) | |
tree | 0a9cb4d89235232be9fbcc0220e2422ade676ae8 /include/apr_general.h | |
parent | 6e6697f140e2c017613704f5a1f255efa1dedcce (diff) | |
download | libapr-2e708d7e28376c458c52fd6d9d49d90b33217c6b.tar.gz |
Changes to apr_generate_random_bytes:
- use apr_size_t for buffer size (please check on non-Unix platforms)
- rewrite DEV_RANDOM implementation to re-open if an EOF is received
(rather than go into an infinite loop), to cope with the odd
/dev/random implementation on BSD/OS 4.1. Also don't leak the fd if the
read() fails, and fix a warning with gcc -Wsign-compare.
git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@64166 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'include/apr_general.h')
-rw-r--r-- | include/apr_general.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/include/apr_general.h b/include/apr_general.h index c81af684c..03574e64c 100644 --- a/include/apr_general.h +++ b/include/apr_general.h @@ -262,12 +262,12 @@ APR_DECLARE(void) apr_terminate2(void); /* TODO: I'm not sure this is the best place to put this prototype...*/ /** - * Generate a string of random bytes. + * Generate random bytes. * @param buf Random bytes go here - * @param length size of the buffer + * @param length number of bytes to read */ APR_DECLARE(apr_status_t) apr_generate_random_bytes(unsigned char * buf, - int length); + apr_size_t length); #endif /** @} */ |