| commit | e3d9b69e8c6f6b78120006282c020c71803a8075 | [log] [tgz] |
|---|---|---|
| author | David Benjamin <davidben@google.com> | Thu Aug 24 11:55:54 2023 -0400 |
| committer | Boringssl LUCI CQ <boringssl-scoped@luci-project-accounts.iam.gserviceaccount.com> | Wed Aug 30 15:18:30 2023 +0000 |
| tree | 837d47c9ec25e0712158f07a7e1b90fba2e97b40 | |
| parent | 79532afc453d5400be886ee7ba9ecb92451a573e [diff] |
Remove another decltype(fclose) See https://boringssl-review.googlesource.com/c/boringssl/+/62465. I missed a spot. Bug: 643 Change-Id: I2824853e37cac9112a9947fb794517e259f2bcc1 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/62645 Reviewed-by: Bob Beck <bbe@google.com> Auto-Submit: David Benjamin <davidben@google.com> Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/crypto/bio/bio_test.cc b/crypto/bio/bio_test.cc index a169b56..c9e0ae0 100644 --- a/crypto/bio/bio_test.cc +++ b/crypto/bio/bio_test.cc
@@ -633,8 +633,11 @@ check_bio_gets(bio.get()); } - using ScopedFILE = std::unique_ptr<FILE, decltype(&fclose)>; - ScopedFILE file(tmpfile(), fclose); + struct FileCloser { + void operator()(FILE *f) const { fclose(f); } + }; + using ScopedFILE = std::unique_ptr<FILE, FileCloser>; + ScopedFILE file(tmpfile()); #if defined(OPENSSL_ANDROID) // On Android, when running from an APK, |tmpfile| does not work. See // b/36991167#comment8.