summaryrefslogtreecommitdiff
path: root/lib/io_debug.h
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2005-11-07 23:27:56 +0000
committerSimon Josefsson <simon@josefsson.org>2005-11-07 23:27:56 +0000
commita5891d75997c9529b9fc5c273df8bd0df4093cd0 (patch)
treefd6eec448a88c5eb891cc145921c5793662da604 /lib/io_debug.h
parentaf21484a8daf15da48f7d00c4fe632708a757a64 (diff)
downloadgnutls-a5891d75997c9529b9fc5c273df8bd0df4093cd0.tar.gz
Use GNU coding style.
Diffstat (limited to 'lib/io_debug.h')
-rw-r--r--lib/io_debug.h36
1 files changed, 20 insertions, 16 deletions
diff --git a/lib/io_debug.h b/lib/io_debug.h
index f04df369c6..696d43b788 100644
--- a/lib/io_debug.h
+++ b/lib/io_debug.h
@@ -42,32 +42,36 @@ static int initialized_rand = 0;
srand(time(0)); \
initialized_rand = 1; \
}
-static int recv_debug(int fd, char *buf, int len, int flags)
+static int
+recv_debug (int fd, char *buf, int len, int flags)
{
- INITIALIZE_RAND;
+ INITIALIZE_RAND;
- if (!(rand() % IO_DEBUG)) {
- errno = EDUNNO;
- return -1;
+ if (!(rand () % IO_DEBUG))
+ {
+ errno = EDUNNO;
+ return -1;
}
- if (len > 1)
- len = 1;
- return recv(fd, buf, len, flags);
+ if (len > 1)
+ len = 1;
+ return recv (fd, buf, len, flags);
}
#define recv recv_debug
-static int send_debug(int fd, const char *buf, int len, int flags)
+static int
+send_debug (int fd, const char *buf, int len, int flags)
{
- INITIALIZE_RAND;
+ INITIALIZE_RAND;
- if (!(rand() % IO_DEBUG)) {
- errno = EDUNNO;
- return -1;
+ if (!(rand () % IO_DEBUG))
+ {
+ errno = EDUNNO;
+ return -1;
}
- if (len > 10)
- len = 10;
- return send(fd, buf, len, flags);
+ if (len > 10)
+ len = 10;
+ return send (fd, buf, len, flags);
}
#define send send_debug