summaryrefslogtreecommitdiffstats
path: root/otafault/config.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--otafault/config.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/otafault/config.cpp b/otafault/config.cpp
index 8590833ee..3993948ff 100644
--- a/otafault/config.cpp
+++ b/otafault/config.cpp
@@ -14,17 +14,15 @@
* limitations under the License.
*/
+#include "otafault/config.h"
+
#include <map>
#include <string>
-#include <stdio.h>
-#include <unistd.h>
-
#include <android-base/stringprintf.h>
#include <ziparchive/zip_archive.h>
-#include "config.h"
-#include "ota_io.h"
+#include "otafault/ota_io.h"
#define OTAIO_MAX_FNAME_SIZE 128
@@ -69,7 +67,9 @@ std::string fault_fname(const char* io_type) {
fname.resize(OTAIO_MAX_FNAME_SIZE);
ZipString zip_type_path(type_path.c_str());
ZipEntry entry;
- int status = FindEntry(archive, zip_type_path, &entry);
+ if (FindEntry(archive, zip_type_path, &entry) != 0) {
+ return {};
+ }
ExtractToMemory(archive, &entry, reinterpret_cast<uint8_t*>(&fname[0]), OTAIO_MAX_FNAME_SIZE);
return fname;
}