From e2134a4b5dafc37f2de7e9b4190819f24aac207c Mon Sep 17 00:00:00 2001 From: Piotr Jastrzebski Date: Wed, 13 Aug 2014 07:50:20 +0100 Subject: Update ziparchive usage to the new API. Bug: 16162465 Change-Id: If3064e2be3e7e85366b07434294a7879b0e5f9bc --- libs/androidfw/ZipFileRO.cpp | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'libs/androidfw/ZipFileRO.cpp') diff --git a/libs/androidfw/ZipFileRO.cpp b/libs/androidfw/ZipFileRO.cpp index a485d2bf59d2..5f6e831a0200 100644 --- a/libs/androidfw/ZipFileRO.cpp +++ b/libs/androidfw/ZipFileRO.cpp @@ -50,8 +50,7 @@ public: ZipEntryName name; void *cookie; - _ZipEntryRO() : cookie(NULL) { - } + _ZipEntryRO() : cookie(NULL) {} ~_ZipEntryRO() { EndIteration(cookie); @@ -87,15 +86,15 @@ ZipFileRO::~ZipFileRO() { ZipEntryRO ZipFileRO::findEntryByName(const char* entryName) const { _ZipEntryRO* data = new _ZipEntryRO; - const int32_t error = FindEntry(mHandle, entryName, &(data->entry)); + + data->name = ZipEntryName(entryName); + + const int32_t error = FindEntry(mHandle, data->name, &(data->entry)); if (error) { delete data; return NULL; } - data->name.name = entryName; - data->name.name_length = strlen(entryName); - return (ZipEntryRO) data; } -- cgit v1.2.3-59-g8ed1b