mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
cleanup: my_off_t mmaped_length -> size_t
all mmap-related functions take size_t lengh. mmaped_length was casted to size_t *every single time*
This commit is contained in:
@@ -95,7 +95,7 @@ my_bool mi_dynmap_file(MI_INFO *info, my_off_t size)
|
||||
#if defined(HAVE_MADVISE)
|
||||
madvise((char*) info->s->file_map, size, MADV_RANDOM);
|
||||
#endif
|
||||
info->s->mmaped_length= size;
|
||||
info->s->mmaped_length= (size_t) size;
|
||||
info->s->file_read= mi_mmap_pread;
|
||||
info->s->file_write= mi_mmap_pwrite;
|
||||
DBUG_RETURN(0);
|
||||
@@ -118,8 +118,7 @@ int mi_munmap_file(MI_INFO *info)
|
||||
{
|
||||
int ret;
|
||||
DBUG_ENTER("mi_unmap_file");
|
||||
if ((ret= my_munmap((void*) info->s->file_map,
|
||||
(size_t) info->s->mmaped_length)))
|
||||
if ((ret= my_munmap((void*) info->s->file_map, info->s->mmaped_length)))
|
||||
DBUG_RETURN(ret);
|
||||
info->s->file_read= mi_nommap_pread;
|
||||
info->s->file_write= mi_nommap_pwrite;
|
||||
|
Reference in New Issue
Block a user