From ca35a9681faf0598dd41fb0e71668eb3c7925faf Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Tue, 6 Nov 2018 05:02:30 -0500 Subject: [PATCH] Minor code improvements --- native/jni/magiskboot/bootimg.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/native/jni/magiskboot/bootimg.cpp b/native/jni/magiskboot/bootimg.cpp index 1352ea897..b35dc5f6b 100644 --- a/native/jni/magiskboot/bootimg.cpp +++ b/native/jni/magiskboot/bootimg.cpp @@ -251,7 +251,7 @@ void boot_img::print_hdr() { } int unpack(const char *image) { - boot_img boot = boot_img(); + boot_img boot {}; int ret = boot.parse_image(image); int fd; @@ -289,7 +289,7 @@ int unpack(const char *image) { #define file_align() write_zero(fd, align_off(lseek(fd, 0, SEEK_CUR) - header_off, boot.page_size())) void repack(const char* orig_image, const char* out_image) { - boot_img boot = boot_img(); + boot_img boot {}; off_t header_off, kernel_off, ramdisk_off, second_off, extra_off;