diff options
author | jsing <> | 2016-11-04 10:51:35 +0000 |
---|---|---|
committer | jsing <> | 2016-11-04 10:51:35 +0000 |
commit | b8bebcaa974c0742248e7d9941cfb70a404ea46b (patch) | |
tree | e05f79460c07056bc8aee4354dfc7269060d1cab /src/lib | |
parent | d8daea57d18a9874231c2f5b625ba176d59586b2 (diff) | |
download | openbsd-b8bebcaa974c0742248e7d9941cfb70a404ea46b.tar.gz openbsd-b8bebcaa974c0742248e7d9941cfb70a404ea46b.tar.bz2 openbsd-b8bebcaa974c0742248e7d9941cfb70a404ea46b.zip |
Do not mix declarations and code.
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/libtls/tls_bio_cb.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/libtls/tls_bio_cb.c b/src/lib/libtls/tls_bio_cb.c index b36018761d..b85c1c606a 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.7 2016/11/04 10:50:32 jsing Exp $ */ | 1 | /* $OpenBSD: tls_bio_cb.c,v 1.8 2016/11/04 10:51:35 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2016 Tobias Pape <tobias@netshed.de> | 3 | * Copyright (c) 2016 Tobias Pape <tobias@netshed.de> |
4 | * | 4 | * |
@@ -168,8 +168,10 @@ static int | |||
168 | tls_bio_write_cb(BIO *h, const char *buf, int num, void *cb_arg) | 168 | tls_bio_write_cb(BIO *h, const char *buf, int num, void *cb_arg) |
169 | { | 169 | { |
170 | struct tls *ctx = cb_arg; | 170 | struct tls *ctx = cb_arg; |
171 | int rv; | ||
172 | |||
171 | BIO_clear_retry_flags(h); | 173 | BIO_clear_retry_flags(h); |
172 | int rv = (ctx->write_cb)(ctx, buf, num, ctx->cb_arg); | 174 | rv = (ctx->write_cb)(ctx, buf, num, ctx->cb_arg); |
173 | if (rv == TLS_WANT_POLLIN) { | 175 | if (rv == TLS_WANT_POLLIN) { |
174 | BIO_set_retry_read(h); | 176 | BIO_set_retry_read(h); |
175 | rv = -1; | 177 | rv = -1; |
@@ -184,8 +186,10 @@ static int | |||
184 | tls_bio_read_cb(BIO *h, char *buf, int size, void *cb_arg) | 186 | tls_bio_read_cb(BIO *h, char *buf, int size, void *cb_arg) |
185 | { | 187 | { |
186 | struct tls *ctx = cb_arg; | 188 | struct tls *ctx = cb_arg; |
189 | int rv; | ||
190 | |||
187 | BIO_clear_retry_flags(h); | 191 | BIO_clear_retry_flags(h); |
188 | int rv = (ctx->read_cb)(ctx, buf, size, ctx->cb_arg); | 192 | rv = (ctx->read_cb)(ctx, buf, size, ctx->cb_arg); |
189 | if (rv == TLS_WANT_POLLIN) { | 193 | if (rv == TLS_WANT_POLLIN) { |
190 | BIO_set_retry_read(h); | 194 | BIO_set_retry_read(h); |
191 | rv = -1; | 195 | rv = -1; |