diff options
author | Yuji Mano <yuji.mano@am.sony.com> | 2009-02-17 19:10:00 -0800 |
---|---|---|
committer | Yuji Mano <yuji.mano@am.sony.com> | 2009-02-17 19:10:00 -0800 |
commit | 32c07d6611e1c7a8b6604eb77b6847719419f446 (patch) | |
tree | ed642b134728f4f4d5d07eb7dadc62a1ce566e43 | |
parent | b468cd7163b1b98b7e9e5ec20647b10cae431d7e (diff) | |
download | mars-src-32c07d6611e1c7a8b6604eb77b6847719419f446.tar.gz |
base: Fix cond_cell.c
Fix is_watch_point so it does not loop through entire futex_watc_point_ea array when futex_watch_point_count is 0.
Signed-off-by: Yuji Mano <yuji.mano@am.sony.com>
-rw-r--r-- | base/src/host/lib/cond_cell.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/base/src/host/lib/cond_cell.c b/base/src/host/lib/cond_cell.c index 6a11c8f..522d71a 100644 --- a/base/src/host/lib/cond_cell.c +++ b/base/src/host/lib/cond_cell.c @@ -118,7 +118,7 @@ static int is_watch_point(uint64_t ea) int i; int valid = 0; - for (i = 0; i < FUTEX_WATCH_POINT_MAX; i++) { + for (i = 0; futex_watch_point_count && i < FUTEX_WATCH_POINT_MAX; i++) { if (futex_watch_point_ea[i] == ea) return 1; else if (futex_watch_point_ea[i] && |