diff options
| 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 |
| commit | ee5bbb7f6304c4930899d069c82fe02e49f050aa (patch) | |
| tree | 276c5b62ca57168e4e1c29770dd2edca68ae55fa /libs/utils | |
| parent | 85d1f158267d64b5660e86fab0baf0432c1dcfbd (diff) | |
| download | frameworks_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.cpp | 8 |
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 |
