]> git.sur5r.net Git - openldap/blobdiff - libraries/liblutil/entropy.c
Fix ldaps / TLS processing...
[openldap] / libraries / liblutil / entropy.c
index b7867839cf80e071161e507e6873a119d4eb55f9..6b7c6c9552f50c036185ed62607fd551672a0f60 100644 (file)
@@ -33,9 +33,8 @@
  * This routinue should be extended to support additional sources
  * of entropy.
  */
-int lutil_entropy( char *buf, int nbytes )
+int lutil_entropy( char *buf, ber_len_t nbytes )
 {
-       if( nbytes < 0 ) return -1;
        if( nbytes == 0 ) return 0;
 
 #ifdef URANDOM_DEVICE
@@ -91,7 +90,7 @@ int lutil_entropy( char *buf, int nbytes )
                 * access to this counter may not be atomic.
                 */
                static int counter = 0;
-               int n;
+               ber_len_t n;
 
                struct rdata_s {
                        int counter;