summaryrefslogtreecommitdiffstats
path: root/libs/utils
diff options
context:
space:
mode:
authorJoe Onorato <joeo@android.com>2009-07-13 14:44:07 -0700
committerJoe Onorato <joeo@android.com>2009-07-15 09:58:07 -0700
commitee5bbb7f6304c4930899d069c82fe02e49f050aa (patch)
tree276c5b62ca57168e4e1c29770dd2edca68ae55fa /libs/utils
parent85d1f158267d64b5660e86fab0baf0432c1dcfbd (diff)
downloadframeworks_base-ee5bbb7f6304c4930899d069c82fe02e49f050aa.zip
frameworks_base-ee5bbb7f6304c4930899d069c82fe02e49f050aa.tar.gz
frameworks_base-ee5bbb7f6304c4930899d069c82fe02e49f050aa.tar.bz2
Need to skip the padding after reading.
m_dataEndPos points to the end of the data, not the beginning of the next entity.
Diffstat (limited to 'libs/utils')
-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 cce754a..be04777 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