mirror of
https://github.com/isar/libmdbx.git
synced 2025-01-09 01:44:13 +08:00
mdbx: more/again reformat by clang-format 6.0 (cosmetic).
Change-Id: I769ee5a80d75a49fc5bb041fefda6f22adc05424
This commit is contained in:
parent
e6c333c751
commit
685abc7bcb
12
src/osal.c
12
src/osal.c
@ -838,13 +838,13 @@ int mdbx_mmap(int flags, mdbx_mmap_t *map, size_t size, size_t limit) {
|
|||||||
rc = NtCreateSection(
|
rc = NtCreateSection(
|
||||||
&map->section,
|
&map->section,
|
||||||
/* DesiredAccess */
|
/* DesiredAccess */
|
||||||
(flags & MDBX_WRITEMAP)
|
(flags & MDBX_WRITEMAP)
|
||||||
? SECTION_QUERY | SECTION_MAP_READ | SECTION_EXTEND_SIZE |
|
? SECTION_QUERY | SECTION_MAP_READ | SECTION_EXTEND_SIZE |
|
||||||
SECTION_MAP_WRITE
|
SECTION_MAP_WRITE
|
||||||
: SECTION_QUERY | SECTION_MAP_READ | SECTION_EXTEND_SIZE,
|
: SECTION_QUERY | SECTION_MAP_READ | SECTION_EXTEND_SIZE,
|
||||||
/* ObjectAttributes */ NULL, /* MaximumSize (InitialSize) */ &SectionSize,
|
/* ObjectAttributes */ NULL, /* MaximumSize (InitialSize) */ &SectionSize,
|
||||||
/* SectionPageProtection */
|
/* SectionPageProtection */
|
||||||
(flags & MDBX_RDONLY) ? PAGE_READONLY : PAGE_READWRITE,
|
(flags & MDBX_RDONLY) ? PAGE_READONLY : PAGE_READWRITE,
|
||||||
/* AllocationAttributes */ SEC_RESERVE, map->fd);
|
/* AllocationAttributes */ SEC_RESERVE, map->fd);
|
||||||
if (!NT_SUCCESS(rc))
|
if (!NT_SUCCESS(rc))
|
||||||
return ntstatus2errcode(rc);
|
return ntstatus2errcode(rc);
|
||||||
@ -858,7 +858,7 @@ int mdbx_mmap(int flags, mdbx_mmap_t *map, size_t size, size_t limit) {
|
|||||||
/* InheritDisposition */ ViewUnmap,
|
/* InheritDisposition */ ViewUnmap,
|
||||||
/* AllocationType */ (flags & MDBX_RDONLY) ? 0 : MEM_RESERVE,
|
/* AllocationType */ (flags & MDBX_RDONLY) ? 0 : MEM_RESERVE,
|
||||||
/* Win32Protect */
|
/* Win32Protect */
|
||||||
(flags & MDBX_WRITEMAP) ? PAGE_READWRITE : PAGE_READONLY);
|
(flags & MDBX_WRITEMAP) ? PAGE_READWRITE : PAGE_READONLY);
|
||||||
if (!NT_SUCCESS(rc)) {
|
if (!NT_SUCCESS(rc)) {
|
||||||
NtClose(map->section);
|
NtClose(map->section);
|
||||||
map->section = 0;
|
map->section = 0;
|
||||||
@ -998,14 +998,14 @@ retry_file_and_section:
|
|||||||
status = NtCreateSection(
|
status = NtCreateSection(
|
||||||
&map->section,
|
&map->section,
|
||||||
/* DesiredAccess */
|
/* DesiredAccess */
|
||||||
(flags & MDBX_WRITEMAP)
|
(flags & MDBX_WRITEMAP)
|
||||||
? SECTION_QUERY | SECTION_MAP_READ | SECTION_EXTEND_SIZE |
|
? SECTION_QUERY | SECTION_MAP_READ | SECTION_EXTEND_SIZE |
|
||||||
SECTION_MAP_WRITE
|
SECTION_MAP_WRITE
|
||||||
: SECTION_QUERY | SECTION_MAP_READ | SECTION_EXTEND_SIZE,
|
: SECTION_QUERY | SECTION_MAP_READ | SECTION_EXTEND_SIZE,
|
||||||
/* ObjectAttributes */ NULL,
|
/* ObjectAttributes */ NULL,
|
||||||
/* MaximumSize (InitialSize) */ &SectionSize,
|
/* MaximumSize (InitialSize) */ &SectionSize,
|
||||||
/* SectionPageProtection */
|
/* SectionPageProtection */
|
||||||
(flags & MDBX_RDONLY) ? PAGE_READONLY : PAGE_READWRITE,
|
(flags & MDBX_RDONLY) ? PAGE_READONLY : PAGE_READWRITE,
|
||||||
/* AllocationAttributes */ SEC_RESERVE, map->fd);
|
/* AllocationAttributes */ SEC_RESERVE, map->fd);
|
||||||
|
|
||||||
if (!NT_SUCCESS(status))
|
if (!NT_SUCCESS(status))
|
||||||
@ -1030,7 +1030,7 @@ retry_mapview:;
|
|||||||
/* InheritDisposition */ ViewUnmap,
|
/* InheritDisposition */ ViewUnmap,
|
||||||
/* AllocationType */ (flags & MDBX_RDONLY) ? 0 : MEM_RESERVE,
|
/* AllocationType */ (flags & MDBX_RDONLY) ? 0 : MEM_RESERVE,
|
||||||
/* Win32Protect */
|
/* Win32Protect */
|
||||||
(flags & MDBX_WRITEMAP) ? PAGE_READWRITE : PAGE_READONLY);
|
(flags & MDBX_WRITEMAP) ? PAGE_READWRITE : PAGE_READONLY);
|
||||||
|
|
||||||
if (!NT_SUCCESS(status)) {
|
if (!NT_SUCCESS(status)) {
|
||||||
if (status == /* STATUS_CONFLICTING_ADDRESSES */ 0xC0000018 &&
|
if (status == /* STATUS_CONFLICTING_ADDRESSES */ 0xC0000018 &&
|
||||||
|
Loading…
x
Reference in New Issue
Block a user