Remove ambiguity in rand_pool_add[_end] return value
[openssl.git] / crypto / rand / rand_vms.c
index 7edec9ebd2282389c56c58dbe5fcaea8465bea91..1507c6ff7c3fd1e803d2ac8c5efe9b872fcfe7f0 100644 (file)
@@ -148,8 +148,9 @@ size_t rand_pool_acquire_entropy(RAND_POOL *pool)
     if (total_length > bytes_remaining)
         total_length = bytes_remaining;
 
-    return rand_pool_add(pool, (PTR_T)data_buffer, total_length,
-                         total_length * ENTROPY_BITS_PER_BYTE);
+    rand_pool_add(pool, (PTR_T)data_buffer, total_length,
+                  total_length * ENTROPY_BITS_PER_BYTE);
+    return rand_pool_entropy_available(pool);
 }
 
 #endif