X-Git-Url: https://git.openssl.org/?a=blobdiff_plain;f=crypto%2Fevp%2Fbio_ok.c;h=5871e632b52eefa633e7133fbe19faf5880f44dd;hb=55bd169fd874f65fa15b20ce4feae2e8ed5e77f1;hp=47228465c5c3b2918c9baced5bdad682c004c17e;hpb=3befffa39dbaf2688d823fcf2bdfc07d2487be48;p=openssl.git diff --git a/crypto/evp/bio_ok.c b/crypto/evp/bio_ok.c index 47228465c5..5871e632b5 100644 --- a/crypto/evp/bio_ok.c +++ b/crypto/evp/bio_ok.c @@ -8,7 +8,7 @@ */ /*- - From: Arne Ansper + From: Arne Ansper Why BIO_f_reliable? @@ -83,7 +83,7 @@ static int ok_read(BIO *h, char *buf, int size); static long ok_ctrl(BIO *h, int cmd, long arg1, void *arg2); static int ok_new(BIO *h); static int ok_free(BIO *data); -static long ok_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); +static long ok_callback_ctrl(BIO *h, int cmd, BIO_info_cb *fp); static __owur int sig_out(BIO *b); static __owur int sig_in(BIO *b); @@ -108,7 +108,8 @@ typedef struct ok_struct { } BIO_OK_CTX; static const BIO_METHOD methods_ok = { - BIO_TYPE_CIPHER, "reliable", + BIO_TYPE_CIPHER, + "reliable", /* TODO: Convert to new style write function */ bwrite_conv, ok_write, @@ -125,7 +126,7 @@ static const BIO_METHOD methods_ok = { const BIO_METHOD *BIO_f_reliable(void) { - return (&methods_ok); + return &methods_ok; } static int ok_new(BIO *bi) @@ -266,7 +267,7 @@ static int ok_write(BIO *b, const char *in, int inl) ret = inl; if ((ctx == NULL) || (next == NULL) || (BIO_get_init(b) == 0)) - return (0); + return 0; if (ctx->sigio && !sig_out(b)) return 0; @@ -280,7 +281,7 @@ static int ok_write(BIO *b, const char *in, int inl) BIO_copy_next_retry(b); if (!BIO_should_retry(b)) ctx->cont = 0; - return (i); + return i; } ctx->buf_off += i; n -= i; @@ -294,7 +295,7 @@ static int ok_write(BIO *b, const char *in, int inl) } if ((in == NULL) || (inl <= 0)) - return (0); + return 0; n = (inl + ctx->buf_len > OK_BLOCK_SIZE + OK_BLOCK_BLOCK) ? (int)(OK_BLOCK_SIZE + OK_BLOCK_BLOCK - ctx->buf_len) : inl; @@ -314,7 +315,7 @@ static int ok_write(BIO *b, const char *in, int inl) BIO_clear_retry_flags(b); BIO_copy_next_retry(b); - return (ret); + return ret; } static long ok_ctrl(BIO *b, int cmd, long num, void *ptr) @@ -402,7 +403,7 @@ static long ok_ctrl(BIO *b, int cmd, long num, void *ptr) return ret; } -static long ok_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) +static long ok_callback_ctrl(BIO *b, int cmd, BIO_info_cb *fp) { long ret = 1; BIO *next;