summaryrefslogtreecommitdiff
path: root/libs/binder/Parcel.cpp
diff options
context:
space:
mode:
author Jeff Brown <jeffbrown@google.com> 2011-10-11 15:33:28 -0700
committer Android Git Automerger <android-git-automerger@android.com> 2011-10-11 15:33:28 -0700
commit241fe477edba539bcc58df4410c307d9540a4233 (patch)
treeebf2e678751cc334857c197ee6119e3640f59e75 /libs/binder/Parcel.cpp
parent5d98d67d3198055228587d1f36e0272876f57405 (diff)
parent58bf986c3e3948242e89654e6d59b97a21345582 (diff)
am 58bf986c: Merge "Use ashmem for CursorWindows. Bug: 5332296" into ics-mr0
* commit '58bf986c3e3948242e89654e6d59b97a21345582': Use ashmem for CursorWindows. Bug: 5332296
Diffstat (limited to 'libs/binder/Parcel.cpp')
-rw-r--r--libs/binder/Parcel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/libs/binder/Parcel.cpp b/libs/binder/Parcel.cpp
index 608877eb7dd7..c7180cee03cd 100644
--- a/libs/binder/Parcel.cpp
+++ b/libs/binder/Parcel.cpp
@@ -752,7 +752,7 @@ status_t Parcel::writeBlob(size_t len, WritableBlob* outBlob)
int result = ashmem_set_prot_region(fd, PROT_READ | PROT_WRITE);
if (result < 0) {
- status = -result;
+ status = result;
} else {
void* ptr = ::mmap(NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0);
if (ptr == MAP_FAILED) {
@@ -760,7 +760,7 @@ status_t Parcel::writeBlob(size_t len, WritableBlob* outBlob)
} else {
result = ashmem_set_prot_region(fd, PROT_READ);
if (result < 0) {
- status = -result;
+ status = result;
} else {
status = writeInt32(1);
if (!status) {