diff options
author | David Benjamin <davidben@google.com> | 2018-09-22 17:56:39 -0500 |
---|---|---|
committer | CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org> | 2018-09-26 17:21:08 +0000 |
commit | fb86b888ef1c1265719208fd6c27a53ceb4920f7 (patch) | |
tree | aa11cf26af91eb235a01e8eadd27dd34f7cb8d0c /crypto/bio | |
parent | c93711b1b51ab7bf6039af4572fe54af2cf43cf0 (diff) | |
download | boringssl-fb86b888ef1c1265719208fd6c27a53ceb4920f7.zip boringssl-fb86b888ef1c1265719208fd6c27a53ceb4920f7.tar.gz boringssl-fb86b888ef1c1265719208fd6c27a53ceb4920f7.tar.bz2 |
Replace BIO_new + BIO_set_fp with BIO_new_fp.
It's a little bit shorter.
Change-Id: Ia1ba55d20ee4f2519a017871f5f5949081569e1a
Reviewed-on: https://boringssl-review.googlesource.com/32104
Commit-Queue: David Benjamin <davidben@google.com>
CQ-Verified: CQ bot account: commit-bot@chromium.org <commit-bot@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/bio')
-rw-r--r-- | crypto/bio/file.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/bio/file.c b/crypto/bio/file.c index 6a0b9a9..a177763 100644 --- a/crypto/bio/file.c +++ b/crypto/bio/file.c @@ -107,13 +107,12 @@ BIO *BIO_new_file(const char *filename, const char *mode) { return NULL; } - ret = BIO_new(BIO_s_file()); + ret = BIO_new_fp(file, BIO_CLOSE); if (ret == NULL) { fclose(file); return NULL; } - BIO_set_fp(ret, file, BIO_CLOSE); return ret; } |