summaryrefslogtreecommitdiffstats
path: root/applypatch/utils.cpp
diff options
context:
space:
mode:
authorTianjie Xu <xunchang@google.com>2016-10-18 02:21:59 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-10-18 02:21:59 +0200
commit13d8ee8c72ae3705819e1e0afae765e2d66a89bf (patch)
treec9f593eb6a4f2a2aaef3d400366525048e40a2b5 /applypatch/utils.cpp
parentMerge "init: move healthd to late-init" am: a01ffc73ef (diff)
parentMerge "Change StringValue to use std::string" (diff)
downloadandroid_bootable_recovery-13d8ee8c72ae3705819e1e0afae765e2d66a89bf.tar
android_bootable_recovery-13d8ee8c72ae3705819e1e0afae765e2d66a89bf.tar.gz
android_bootable_recovery-13d8ee8c72ae3705819e1e0afae765e2d66a89bf.tar.bz2
android_bootable_recovery-13d8ee8c72ae3705819e1e0afae765e2d66a89bf.tar.lz
android_bootable_recovery-13d8ee8c72ae3705819e1e0afae765e2d66a89bf.tar.xz
android_bootable_recovery-13d8ee8c72ae3705819e1e0afae765e2d66a89bf.tar.zst
android_bootable_recovery-13d8ee8c72ae3705819e1e0afae765e2d66a89bf.zip
Diffstat (limited to 'applypatch/utils.cpp')
-rw-r--r--applypatch/utils.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/applypatch/utils.cpp b/applypatch/utils.cpp
index fef250f01..450dc8d76 100644
--- a/applypatch/utils.cpp
+++ b/applypatch/utils.cpp
@@ -38,22 +38,22 @@ void Write8(int64_t value, FILE* f) {
fputc((value >> 56) & 0xff, f);
}
-int Read2(void* pv) {
- unsigned char* p = reinterpret_cast<unsigned char*>(pv);
+int Read2(const void* pv) {
+ const unsigned char* p = reinterpret_cast<const unsigned char*>(pv);
return (int)(((unsigned int)p[1] << 8) |
(unsigned int)p[0]);
}
-int Read4(void* pv) {
- unsigned char* p = reinterpret_cast<unsigned char*>(pv);
+int Read4(const void* pv) {
+ const unsigned char* p = reinterpret_cast<const unsigned char*>(pv);
return (int)(((unsigned int)p[3] << 24) |
((unsigned int)p[2] << 16) |
((unsigned int)p[1] << 8) |
(unsigned int)p[0]);
}
-int64_t Read8(void* pv) {
- unsigned char* p = reinterpret_cast<unsigned char*>(pv);
+int64_t Read8(const void* pv) {
+ const unsigned char* p = reinterpret_cast<const unsigned char*>(pv);
return (int64_t)(((uint64_t)p[7] << 56) |
((uint64_t)p[6] << 48) |
((uint64_t)p[5] << 40) |