summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@gnutls.org>2001-10-23 17:35:18 +0000
committerNikos Mavrogiannopoulos <nmav@gnutls.org>2001-10-23 17:35:18 +0000
commitde10598566b6b17b031f647941c2e4b73b049225 (patch)
treef2e2e30b487bc132d2878d04d619452b7573ef42
parentd782a44f1c756dfa19b395ad30e8564b6c7a607a (diff)
downloadgnutls-de10598566b6b17b031f647941c2e4b73b049225.tar.gz
cleanups
-rw-r--r--lib/gnutls_buffers.c4
-rw-r--r--lib/gnutls_int.h1
-rw-r--r--lib/io_debug.h4
3 files changed, 7 insertions, 2 deletions
diff --git a/lib/gnutls_buffers.c b/lib/gnutls_buffers.c
index e6d78fc840..3fe49d94a6 100644
--- a/lib/gnutls_buffers.c
+++ b/lib/gnutls_buffers.c
@@ -33,6 +33,10 @@
# define EAGAIN EWOULDBLOCK
#endif
+#ifdef IO_DEBUG
+# include <io_debug.h>
+#endif
+
extern ssize_t (*_gnutls_pull_func)( SOCKET, void*, size_t);
extern ssize_t (*_gnutls_push_func)( SOCKET,const void*, size_t);
diff --git a/lib/gnutls_int.h b/lib/gnutls_int.h
index 10bf979da9..d346e184e9 100644
--- a/lib/gnutls_int.h
+++ b/lib/gnutls_int.h
@@ -25,6 +25,7 @@
#include <defines.h>
/*
+#define IO_DEBUG
#define BUFFERS_DEBUG
#define HARD_DEBUG
#define READ_DEBUG
diff --git a/lib/io_debug.h b/lib/io_debug.h
index 68b04f1f51..8a8c95aaf5 100644
--- a/lib/io_debug.h
+++ b/lib/io_debug.h
@@ -42,7 +42,7 @@ static int recv_debug (int fd, char *buf, int len, int flags)
{
INITIALIZE_RAND;
- if (!(rand % 2)) {
+ if (!(rand() % 2)) {
errno = EDUNNO;
return -1;
}
@@ -53,7 +53,7 @@ static int recv_debug (int fd, char *buf, int len, int flags)
#define recv recv_debug
-static int send_debug (int fd, char *buf, int len, int flags)
+static int send_debug (int fd, const char *buf, int len, int flags)
{
INITIALIZE_RAND;