summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Joe Onorato <joeo@android.com> 2009-07-13 14:44:07 -0700
committer Joe Onorato <joeo@android.com> 2009-07-15 09:58:07 -0700
commitee5bbb7f6304c4930899d069c82fe02e49f050aa (patch)
tree276c5b62ca57168e4e1c29770dd2edca68ae55fa
parent85d1f158267d64b5660e86fab0baf0432c1dcfbd (diff)
Need to skip the padding after reading.
m_dataEndPos points to the end of the data, not the beginning of the next entity.
-rw-r--r--libs/utils/BackupData.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/libs/utils/BackupData.cpp b/libs/utils/BackupData.cpp
index cce754a08213..be04777528ea 100644
--- a/libs/utils/BackupData.cpp
+++ b/libs/utils/BackupData.cpp
@@ -298,10 +298,12 @@ BackupDataReader::SkipEntityData()
}
if (m_header.entity.dataSize > 0) {
int pos = lseek(m_fd, m_dataEndPos, SEEK_SET);
- return pos == -1 ? (int)errno : (int)NO_ERROR;
- } else {
- return NO_ERROR;
+ if (pos == -1) {
+ return errno;
+ }
}
+ SKIP_PADDING();
+ return NO_ERROR;
}
ssize_t