From 544bb7459cd43431f3c64437b048be2a8ffe4be3 Mon Sep 17 00:00:00 2001 From: topjohnwu Date: Thu, 26 Sep 2019 03:49:05 -0400 Subject: [PATCH] Don't pass by reference --- native/jni/magiskboot/magiskboot.h | 2 +- native/jni/magiskboot/pattern.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/native/jni/magiskboot/magiskboot.h b/native/jni/magiskboot/magiskboot.h index 59bab4439..1cbbd82ea 100644 --- a/native/jni/magiskboot/magiskboot.h +++ b/native/jni/magiskboot/magiskboot.h @@ -19,5 +19,5 @@ int cpio_commands(int argc, char *argv[]); int dtb_commands(int argc, char *argv[]); char *patch_verity(const void *buf, uint32_t &size, bool inplace = false); -void patch_encryption(void *&buf, uint32_t &size); +void patch_encryption(void *buf, uint32_t &size); bool check_env(const char *name); diff --git a/native/jni/magiskboot/pattern.cpp b/native/jni/magiskboot/pattern.cpp index 5df10356d..03bde4879 100644 --- a/native/jni/magiskboot/pattern.cpp +++ b/native/jni/magiskboot/pattern.cpp @@ -55,7 +55,7 @@ char *patch_verity(const void *buf, uint32_t &size, bool inplace) { return patched; } -void patch_encryption(void *&buf, uint32_t &size) { +void patch_encryption(void *buf, uint32_t &size) { auto src = static_cast(buf); int src_size = size; int write = 0;