diff options
author | David Benjamin <davidben@chromium.org> | 2015-10-02 21:54:20 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-10-13 01:18:17 +0300 |
commit | 617eac6a21901e5e096e4b9acd6b467957d17949 (patch) | |
tree | f3b4af505739c00342960a38a93fe935c5a10319 /crypto/bio | |
parent | c7ce977fb98c12fe52699459e6f99eb85842eb2c (diff) |
Align BIO_get_fd with upstream.
OpenSSL's BIO_get_fd returns the fd or -1, not a boolean.
Change-Id: I12a3429c71bb9c9064f9f91329a88923025f1fb5
Reviewed-on: https://boringssl-review.googlesource.com/6080
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/bio')
-rw-r--r-- | crypto/bio/connect.c | 4 | ||||
-rw-r--r-- | crypto/bio/fd.c | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/crypto/bio/connect.c b/crypto/bio/connect.c index 2ed2def1..cc28ef87 100644 --- a/crypto/bio/connect.c +++ b/crypto/bio/connect.c @@ -445,9 +445,9 @@ static long conn_ctrl(BIO *bio, int cmd, long num, void *ptr) { if (ip != NULL) { *ip = bio->num; } - ret = 1; + ret = bio->num; } else { - ret = 0; + ret = -1; } break; case BIO_CTRL_GET_CLOSE: diff --git a/crypto/bio/fd.c b/crypto/bio/fd.c index 0b5baca9..0b3484c9 100644 --- a/crypto/bio/fd.c +++ b/crypto/bio/fd.c @@ -208,9 +208,9 @@ static long fd_ctrl(BIO *b, int cmd, long num, void *ptr) { if (ip != NULL) { *ip = b->num; } - return 1; + return b->num; } else { - ret = 0; + ret = -1; } break; case BIO_CTRL_GET_CLOSE: |