From 087e71393ee1af71d295bbdbd322621685dc0078 Mon Sep 17 00:00:00 2001 From: Gabriel Ferreira Date: Mon, 10 Oct 2022 20:04:41 -0300 Subject: [PATCH] core: Fix clang-tidy modernize-use-nullptr warnings --- src/core/model/breakpoint.cc | 6 +++--- src/core/model/system-path.cc | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/model/breakpoint.cc b/src/core/model/breakpoint.cc index cf395b031..9c7c751e5 100644 --- a/src/core/model/breakpoint.cc +++ b/src/core/model/breakpoint.cc @@ -52,17 +52,17 @@ BreakpointFallback() #else void -BreakpointFallback(void) +BreakpointFallback() { NS_LOG_FUNCTION_NOARGS(); - int* a = 0; + int* a = nullptr; /** * we test here to allow a debugger to change the value of * the variable 'a' to allow the debugger to avoid the * subsequent segfault. */ - if (a == 0) + if (a == nullptr) { *a = 0; } diff --git a/src/core/model/system-path.cc b/src/core/model/system-path.cc index 0074dc5f0..a72e7166a 100644 --- a/src/core/model/system-path.cc +++ b/src/core/model/system-path.cc @@ -186,13 +186,13 @@ FindSelfDirectory() // LPTSTR = char * DWORD size = 1024; LPTSTR lpFilename = (LPTSTR)malloc(sizeof(TCHAR) * size); - DWORD status = GetModuleFileName(0, lpFilename, size); + DWORD status = GetModuleFileName(nullptr, lpFilename, size); while (status == size) { size = size * 2; free(lpFilename); lpFilename = (LPTSTR)malloc(sizeof(TCHAR) * size); - status = GetModuleFileName(0, lpFilename, size); + status = GetModuleFileName(nullptr, lpFilename, size); } NS_ASSERT(status != 0); filename = lpFilename;