Add oatopt drop in replacement for dexopt
Change-Id: I094375230af2d9a88e30245b390cac71be7b50f4
diff --git a/src/zip_archive.cc b/src/zip_archive.cc
index 82d97ec..41a25de 100644
--- a/src/zip_archive.cc
+++ b/src/zip_archive.cc
@@ -257,7 +257,6 @@
}
}
-// return new ZipArchive instance on success, NULL on error.
ZipArchive* ZipArchive::Open(const std::string& filename) {
DCHECK(!filename.empty());
int fd = open(filename.c_str(), O_RDONLY | O_CLOEXEC, 0);
@@ -265,6 +264,10 @@
PLOG(WARNING) << "Unable to open '" << filename << "'";
return NULL;
}
+ return Open(fd);
+}
+
+ZipArchive* ZipArchive::Open(int fd) {
UniquePtr<ZipArchive> zip_archive(new ZipArchive(fd));
if (zip_archive.get() == NULL) {
return NULL;