refactor: use nullptr instead of NULL (#1884)

* refactor: use nullptr instead of NULL.

No functional changes; just more C++ification
This commit is contained in:
Charles Kerr
2021-10-06 11:32:17 -05:00
committed by GitHub
parent cc204e0b2c
commit 003685b40a
46 changed files with 1453 additions and 1391 deletions

View File

@@ -24,8 +24,8 @@
****
***/
static dtr_callbacks const* callbacks = NULL;
static void* callback_arg = NULL;
static dtr_callbacks const* callbacks = nullptr;
static void* callback_arg = nullptr;
static int signal_pipe[2];
@@ -83,7 +83,7 @@ static void* signal_handler_thread_main(void* arg)
handle_signal(sig);
}
return NULL;
return nullptr;
}
static bool create_signal_pipe(tr_error** error)
@@ -110,7 +110,7 @@ static bool create_signal_handler_thread(pthread_t* thread, tr_error** error)
return false;
}
if ((errno = pthread_create(thread, NULL, &signal_handler_thread_main, NULL)) != 0)
if ((errno = pthread_create(thread, nullptr, &signal_handler_thread_main, nullptr)) != 0)
{
set_system_error(error, errno, "pthread_create() failed");
destroy_signal_pipe();
@@ -123,7 +123,7 @@ static bool create_signal_handler_thread(pthread_t* thread, tr_error** error)
static void destroy_signal_handler_thread(pthread_t thread)
{
send_signal_to_pipe(0);
pthread_join(thread, NULL);
pthread_join(thread, nullptr);
destroy_signal_pipe();
}