summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorChih-hung Hsieh <chh@google.com>2016-04-19 00:39:41 +0200
committerandroid-build-merger <android-build-merger@google.com>2016-04-19 00:39:41 +0200
commit7140a083c7d37a86ae95bb671fd5dd932b272e6b (patch)
tree3fca7568ae457f415fe41088a497f7de328afd54 /recovery.cpp
parentMerge "Fix IWYU errors." am: 51dcd0d am: 405db92 (diff)
parentMerge "Fix google-runtime-int warnings." am: a1f4a1e am: bcad1d1 (diff)
downloadandroid_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar.gz
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar.bz2
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar.lz
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar.xz
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.tar.zst
android_bootable_recovery-7140a083c7d37a86ae95bb671fd5dd932b272e6b.zip
Diffstat (limited to 'recovery.cpp')
-rw-r--r--recovery.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 756e1c544..f913dc5b4 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -394,7 +394,7 @@ static void copy_log_file_to_pmsg(const char* source, const char* destination) {
}
// How much of the temp log we have copied to the copy in cache.
-static long tmplog_offset = 0;
+static off_t tmplog_offset = 0;
static void copy_log_file(const char* source, const char* destination, bool append) {
FILE* dest_fp = fopen_path(destination, append ? "a" : "w");
@@ -404,7 +404,7 @@ static void copy_log_file(const char* source, const char* destination, bool appe
FILE* source_fp = fopen(source, "r");
if (source_fp != nullptr) {
if (append) {
- fseek(source_fp, tmplog_offset, SEEK_SET); // Since last write
+ fseeko(source_fp, tmplog_offset, SEEK_SET); // Since last write
}
char buf[4096];
size_t bytes;
@@ -412,7 +412,7 @@ static void copy_log_file(const char* source, const char* destination, bool appe
fwrite(buf, 1, bytes, dest_fp);
}
if (append) {
- tmplog_offset = ftell(source_fp);
+ tmplog_offset = ftello(source_fp);
}
check_and_fclose(source_fp, source);
}
@@ -1273,7 +1273,7 @@ static ssize_t logrotate(
if (!isdigit(number.data()[0])) {
name += ".1";
} else {
- unsigned long long i = std::stoull(number);
+ auto i = std::stoull(number);
name = sub + "." + std::to_string(i + 1);
}
}