aes/asm/vpaes-ppc.pl: add little-endian support.
[openssl.git] / crypto / rand / rand_egd.c
index 97334a92e1e94bd5401a96f82fe208041800e608..7351f4eadec90ef8b011cc07d592ca0d77a5d09c 100644 (file)
@@ -72,7 +72,7 @@
  *   of entropy bytes are requested. The connection is left open until the
  *   query is competed.
  *   RAND_query_egd_bytes() returns with
- *     -1  if an error occured during connection or communication.
+ *     -1  if an error occurred during connection or communication.
  *     num the number of bytes read from the EGD socket. This number is either
  *         the number of bytes requested or smaller, if the EGD pool is
  *         drained and the daemon signals that the pool is empty.
@@ -84,7 +84,7 @@
  *   RAND_egd_bytes() is a wrapper for RAND_query_egd_bytes() with buf=NULL.
  *   Unlike RAND_query_egd_bytes(), RAND_status() is used to test the
  *   seed status so that the return value can reflect the seed state:
- *     -1  if an error occured during connection or communication _or_
+ *     -1  if an error occurred during connection or communication _or_
  *         if the PRNG has still not received the required seeding.
  *     num the number of bytes read from the EGD socket. This number is either
  *         the number of bytes requested or smaller, if the EGD pool is
@@ -133,11 +133,11 @@ struct    sockaddr_un {
 #  define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
 #endif
 
-int RAND_query_egd_bytes(const char *path, unsigned char *buf, size_t bytes)
+int RAND_query_egd_bytes(const char *path, unsigned char *buf, int bytes)
        {
        int ret = 0;
        struct sockaddr_un addr;
-       size_t len, num, numbytes;
+       int len, num, numbytes;
        int fd = -1;
        int success;
        unsigned char egdbuf[2], tempbuf[255], *retrievebuf;
@@ -281,7 +281,7 @@ int RAND_query_egd_bytes(const char *path, unsigned char *buf, size_t bytes)
        }
 
 
-int RAND_egd_bytes(const char *path, size_t bytes)
+int RAND_egd_bytes(const char *path, int bytes)
        {
        int num, ret = 0;