diff options
author | jsing <> | 2016-11-04 15:42:29 +0000 |
---|---|---|
committer | jsing <> | 2016-11-04 15:42:29 +0000 |
commit | e4b7ccb772bf94290d42d448cd5c371f6b3c8df8 (patch) | |
tree | e1c05d3fc082800dc9873d1e9dff433f4706f0b3 /src/lib | |
parent | 43ef3a3745e4c63b270ac55f8629baea5641d8d9 (diff) | |
download | openbsd-e4b7ccb772bf94290d42d448cd5c371f6b3c8df8.tar.gz openbsd-e4b7ccb772bf94290d42d448cd5c371f6b3c8df8.tar.bz2 openbsd-e4b7ccb772bf94290d42d448cd5c371f6b3c8df8.zip |
Rename struct bio_cb_st to struct bio_cb.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libtls/tls_bio_cb.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/lib/libtls/tls_bio_cb.c b/src/lib/libtls/tls_bio_cb.c index dd5675322b..97a763867e 100644 --- a/src/lib/libtls/tls_bio_cb.c +++ b/src/lib/libtls/tls_bio_cb.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls_bio_cb.c,v 1.11 2016/11/04 15:39:16 jsing Exp $ */ | 1 | /* $OpenBSD: tls_bio_cb.c,v 1.12 2016/11/04 15:42:29 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2016 Tobias Pape <tobias@netshed.de> | 3 | * Copyright (c) 2016 Tobias Pape <tobias@netshed.de> |
4 | * | 4 | * |
@@ -31,7 +31,7 @@ static long bio_cb_ctrl(BIO *bio, int cmd, long num, void *ptr); | |||
31 | static int bio_cb_new(BIO *bio); | 31 | static int bio_cb_new(BIO *bio); |
32 | static int bio_cb_free(BIO *bio); | 32 | static int bio_cb_free(BIO *bio); |
33 | 33 | ||
34 | struct bio_cb_st { | 34 | struct bio_cb { |
35 | int (*write_cb)(BIO *bio, const char *buf, int num, void *cb_arg); | 35 | int (*write_cb)(BIO *bio, const char *buf, int num, void *cb_arg); |
36 | int (*read_cb)(BIO *bio, char *buf, int size, void *cb_arg); | 36 | int (*read_cb)(BIO *bio, char *buf, int size, void *cb_arg); |
37 | void *cb_arg; | 37 | void *cb_arg; |
@@ -57,9 +57,9 @@ bio_s_cb(void) | |||
57 | static int | 57 | static int |
58 | bio_cb_new(BIO *bio) | 58 | bio_cb_new(BIO *bio) |
59 | { | 59 | { |
60 | struct bio_cb_st *bcb; | 60 | struct bio_cb *bcb; |
61 | 61 | ||
62 | bcb = calloc(1, sizeof(struct bio_cb_st)); | 62 | bcb = calloc(1, sizeof(struct bio_cb)); |
63 | if (bcb == NULL) | 63 | if (bcb == NULL) |
64 | return (0); | 64 | return (0); |
65 | 65 | ||
@@ -90,14 +90,14 @@ bio_cb_free(BIO *bio) | |||
90 | static int | 90 | static int |
91 | bio_cb_read(BIO *bio, char *buf, int size) | 91 | bio_cb_read(BIO *bio, char *buf, int size) |
92 | { | 92 | { |
93 | struct bio_cb_st *bcb = bio->ptr; | 93 | struct bio_cb *bcb = bio->ptr; |
94 | return (bcb->read_cb(bio, buf, size, bcb->cb_arg)); | 94 | return (bcb->read_cb(bio, buf, size, bcb->cb_arg)); |
95 | } | 95 | } |
96 | 96 | ||
97 | static int | 97 | static int |
98 | bio_cb_write(BIO *bio, const char *buf, int num) | 98 | bio_cb_write(BIO *bio, const char *buf, int num) |
99 | { | 99 | { |
100 | struct bio_cb_st *bcb = bio->ptr; | 100 | struct bio_cb *bcb = bio->ptr; |
101 | return (bcb->write_cb(bio, buf, num, bcb->cb_arg)); | 101 | return (bcb->write_cb(bio, buf, num, bcb->cb_arg)); |
102 | } | 102 | } |
103 | 103 | ||
@@ -174,7 +174,7 @@ tls_bio_read_cb(BIO *bio, char *buf, int size, void *cb_arg) | |||
174 | static BIO * | 174 | static BIO * |
175 | tls_get_new_cb_bio(struct tls *ctx) | 175 | tls_get_new_cb_bio(struct tls *ctx) |
176 | { | 176 | { |
177 | struct bio_cb_st *b; | 177 | struct bio_cb *b; |
178 | BIO *bio; | 178 | BIO *bio; |
179 | 179 | ||
180 | if (ctx->read_cb == NULL || ctx->write_cb == NULL) | 180 | if (ctx->read_cb == NULL || ctx->write_cb == NULL) |
@@ -186,7 +186,7 @@ tls_get_new_cb_bio(struct tls *ctx) | |||
186 | return (NULL); | 186 | return (NULL); |
187 | } | 187 | } |
188 | 188 | ||
189 | b = (struct bio_cb_st *)bio->ptr; | 189 | b = (struct bio_cb *)bio->ptr; |
190 | b->read_cb = tls_bio_read_cb; | 190 | b->read_cb = tls_bio_read_cb; |
191 | b->write_cb = tls_bio_write_cb; | 191 | b->write_cb = tls_bio_write_cb; |
192 | b->cb_arg = ctx; | 192 | b->cb_arg = ctx; |