diff options
author | dbailey <dbailey@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-04-20 19:10:56 +0000 |
---|---|---|
committer | dbailey <dbailey@f38db490-d61c-443f-a65b-d21fe96a405b> | 2009-04-20 19:10:56 +0000 |
commit | fe4f992c054c2a3adb75730e1c9e6f207d124445 (patch) | |
tree | cd02334e3c040bdcd5f1ec131ff8e15bad2cde45 /main/db1-ast | |
parent | 78469be4d05fe0c45252a6ef15b9b01f63346524 (diff) |
Clean up problem with manager implementation of mmap where it was not testing against MAP_FAILED response.
Got rid of shadowed variable used in processign the mmap results.
Change test of mmap results to compare against MAP_FAILED
git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.4@189391 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'main/db1-ast')
-rw-r--r-- | main/db1-ast/recno/rec_open.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/main/db1-ast/recno/rec_open.c b/main/db1-ast/recno/rec_open.c index 0ebc8c7c4..0fb08258c 100644 --- a/main/db1-ast/recno/rec_open.c +++ b/main/db1-ast/recno/rec_open.c @@ -169,7 +169,7 @@ slow: if ((t->bt_rfp = fdopen(rfd, "r")) == NULL) t->bt_msize = sb.st_size; if ((t->bt_smap = mmap(NULL, t->bt_msize, PROT_READ, MAP_PRIVATE, rfd, - (off_t)0)) == (caddr_t)-1) + (off_t)0)) == MAP_FAILED goto slow; t->bt_cmap = t->bt_smap; t->bt_emap = t->bt_smap + sb.st_size; |