]> git.sur5r.net Git - openldap/commit
Clean up MAP_FAILED handling in mdb.
authorHallvard Furuseth <hallvard@openldap.org>
Fri, 9 Mar 2012 18:06:04 +0000 (19:06 +0100)
committerQuanah Gibson-Mount <quanah@openldap.org>
Fri, 9 Mar 2012 22:12:42 +0000 (14:12 -0800)
commit268164213f1e4183101d143525178f67506734a2
tree727296ab508f825446ba11bfc389d25692b7dd26
parentefa83162d4e2d43ced368b8d3f1ee50e40e6b2b1
Clean up MAP_FAILED handling in mdb.

Delay (MDB_txninfo*) cast to after comparing mmap() with MAP_FAILED.
Otherwise, if MAP_FAILED = (void*)-1 but MDB_txninfo requires stricter
alignment, the compiler could assume the result is never MAP_FAILED.

Also store NULL in env->(me_map, me_txns) after mmap failure.
libraries/libmdb/mdb.c