зеркало из https://github.com/microsoft/snmalloc.git
Add another checker.
Use nullptr where appropriate.
This commit is contained in:
Родитель
c3c71afa57
Коммит
22d33ebf99
|
@ -1 +1 @@
|
|||
Checks: '-*,clang-diagnostic-*,google-readability-casting,readability-else-after-return'
|
||||
Checks: '-*,clang-diagnostic-*,google-readability-casting,readability-else-after-return,performance-unnecessary-copy-initialization,bugprone-use-after-move,modernize-use-nullptr'
|
||||
|
|
|
@ -254,7 +254,7 @@ extern "C"
|
|||
if (overflow)
|
||||
{
|
||||
errno = ENOMEM;
|
||||
return 0;
|
||||
return nullptr;
|
||||
}
|
||||
// Include size 0 in the first sizeclass.
|
||||
sz = ((sz - 1) >> (bits::BITS - 1)) + sz;
|
||||
|
|
|
@ -78,7 +78,7 @@ namespace snmalloc
|
|||
size_t log2align = bits::next_pow2_bits(align);
|
||||
|
||||
void* p = mmap(
|
||||
NULL,
|
||||
nullptr,
|
||||
request,
|
||||
PROT_READ | PROT_WRITE,
|
||||
MAP_PRIVATE | MAP_ANONYMOUS | MAP_ALIGNED(log2align),
|
||||
|
|
Загрузка…
Ссылка в новой задаче