diff options
| author | Steven Fackler <[email protected]> | 2015-07-06 11:09:19 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2015-07-06 11:09:19 -0700 |
| commit | 114e8a5a58a8fb3c4cc37391fc2f5a7addd796fc (patch) | |
| tree | d35618791cfc3bf1815b310639f74185a0d0464d /openssl/src/bio/mod.rs | |
| parent | Merge branch 'release-v0.6.3' into release (diff) | |
| parent | Release v0.6.4 (diff) | |
| download | rust-openssl-0.6.4.tar.xz rust-openssl-0.6.4.zip | |
Merge branch 'release-v0.6.4' into releasev0.6.4
Diffstat (limited to 'openssl/src/bio/mod.rs')
| -rw-r--r-- | openssl/src/bio/mod.rs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/openssl/src/bio/mod.rs b/openssl/src/bio/mod.rs index e81694a4..7eea16d8 100644 --- a/openssl/src/bio/mod.rs +++ b/openssl/src/bio/mod.rs @@ -73,11 +73,10 @@ impl Read for MemBio { if ret <= 0 { let is_eof = unsafe { ffi::BIO_eof(self.bio) }; - if is_eof { + if is_eof != 0 { Ok(0) } else { - Err(io::Error::new(io::ErrorKind::Other, - SslError::get())) + Err(io::Error::new(io::ErrorKind::Other, SslError::get())) } } else { Ok(ret as usize) @@ -93,8 +92,7 @@ impl Write for MemBio { }; if ret < 0 { - Err(io::Error::new(io::ErrorKind::Other, - SslError::get())) + Err(io::Error::new(io::ErrorKind::Other, SslError::get())) } else { Ok(ret as usize) } |