summaryrefslogtreecommitdiffstats
path: root/lib/libcrypto/bio/bss_null.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libcrypto/bio/bss_null.c')
-rw-r--r--lib/libcrypto/bio/bss_null.c102
1 files changed, 55 insertions, 47 deletions
diff --git a/lib/libcrypto/bio/bss_null.c b/lib/libcrypto/bio/bss_null.c
index 46b73339dff..51aed2ac4bd 100644
--- a/lib/libcrypto/bio/bss_null.c
+++ b/lib/libcrypto/bio/bss_null.c
@@ -68,8 +68,8 @@ static int null_gets(BIO *h, char *str, int size);
static long null_ctrl(BIO *h, int cmd, long arg1, void *arg2);
static int null_new(BIO *h);
static int null_free(BIO *data);
-static BIO_METHOD null_method=
- {
+
+static BIO_METHOD null_method = {
BIO_TYPE_NULL,
"NULL",
null_write,
@@ -80,50 +80,56 @@ static BIO_METHOD null_method=
null_new,
null_free,
NULL,
- };
+};
-BIO_METHOD *BIO_s_null(void)
- {
- return(&null_method);
- }
+BIO_METHOD
+*BIO_s_null(void)
+{
+ return (&null_method);
+}
-static int null_new(BIO *bi)
- {
- bi->init=1;
- bi->num=0;
- bi->ptr=(NULL);
- return(1);
- }
+static int
+null_new(BIO *bi)
+{
+ bi->init = 1;
+ bi->num = 0;
+ bi->ptr = (NULL);
+ return (1);
+}
-static int null_free(BIO *a)
- {
- if (a == NULL) return(0);
- return(1);
- }
-
-static int null_read(BIO *b, char *out, int outl)
- {
- return(0);
- }
+static int
+null_free(BIO *a)
+{
+ if (a == NULL)
+ return (0);
+ return (1);
+}
-static int null_write(BIO *b, const char *in, int inl)
- {
- return(inl);
- }
+static int
+null_read(BIO *b, char *out, int outl)
+{
+ return (0);
+}
+
+static int
+null_write(BIO *b, const char *in, int inl)
+{
+ return (inl);
+}
-static long null_ctrl(BIO *b, int cmd, long num, void *ptr)
- {
- long ret=1;
+static long
+null_ctrl(BIO *b, int cmd, long num, void *ptr)
+{
+ long ret = 1;
- switch (cmd)
- {
+ switch (cmd) {
case BIO_CTRL_RESET:
case BIO_CTRL_EOF:
case BIO_CTRL_SET:
case BIO_CTRL_SET_CLOSE:
case BIO_CTRL_FLUSH:
case BIO_CTRL_DUP:
- ret=1;
+ ret = 1;
break;
case BIO_CTRL_GET_CLOSE:
case BIO_CTRL_INFO:
@@ -131,20 +137,22 @@ static long null_ctrl(BIO *b, int cmd, long num, void *ptr)
case BIO_CTRL_PENDING:
case BIO_CTRL_WPENDING:
default:
- ret=0;
+ ret = 0;
break;
- }
- return(ret);
}
+ return (ret);
+}
-static int null_gets(BIO *bp, char *buf, int size)
- {
- return(0);
- }
-
-static int null_puts(BIO *bp, const char *str)
- {
- if (str == NULL) return(0);
- return(strlen(str));
- }
+static int
+null_gets(BIO *bp, char *buf, int size)
+{
+ return (0);
+}
+static int
+null_puts(BIO *bp, const char *str)
+{
+ if (str == NULL)
+ return (0);
+ return (strlen(str));
+}