Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Robert Dubner
OpenLDAP
Commits
ea30be61
Commit
ea30be61
authored
Feb 06, 2019
by
Kris Zyp
Committed by
Howard Chu
Feb 10, 2019
Browse files
ITS#8975 WIN32: Skip setting file pointer for write maps
CreateFileMapping already takes care of it.
parent
8c39ba10
Changes
1
Hide whitespace changes
Inline
Side-by-side
libraries/liblmdb/mdb.c
View file @
ea30be61
...
...
@@ -3991,9 +3991,9 @@ mdb_env_map(MDB_env *env, void *addr)
* and won't map more than the file size.
* Just set the maxsize right now.
*/
if
(
SetFilePointer
(
env
->
me_fd
,
sizelo
,
&
sizehi
,
0
)
!=
(
DWORD
)
sizelo
if
(!(flags & MDB_WRITEMAP) &&
(SetFilePointer(env->me_fd, sizelo, &sizehi, 0) != (DWORD)sizelo
|| !SetEndOfFile(env->me_fd)
||
SetFilePointer
(
env
->
me_fd
,
0
,
NULL
,
0
)
!=
0
)
|| SetFilePointer(env->me_fd, 0, NULL, 0) != 0)
)
return ErrCode();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment