Commit 544bb745 authored by topjohnwu's avatar topjohnwu

Don't pass by reference

parent 578a50b4
...@@ -19,5 +19,5 @@ int cpio_commands(int argc, char *argv[]); ...@@ -19,5 +19,5 @@ int cpio_commands(int argc, char *argv[]);
int dtb_commands(int argc, char *argv[]); int dtb_commands(int argc, char *argv[]);
char *patch_verity(const void *buf, uint32_t &size, bool inplace = false); 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); bool check_env(const char *name);
...@@ -55,7 +55,7 @@ char *patch_verity(const void *buf, uint32_t &size, bool inplace) { ...@@ -55,7 +55,7 @@ char *patch_verity(const void *buf, uint32_t &size, bool inplace) {
return patched; return patched;
} }
void patch_encryption(void *&buf, uint32_t &size) { void patch_encryption(void *buf, uint32_t &size) {
auto src = static_cast<char *>(buf); auto src = static_cast<char *>(buf);
int src_size = size; int src_size = size;
int write = 0; int write = 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment