diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/lib/iomgr/exec_ctx.h | 2 | ||||
-rw-r--r-- | src/core/lib/iomgr/gethostname_sysconf.cc | 2 | ||||
-rw-r--r-- | src/core/lib/iomgr/wakeup_fd_nospecial.cc | 2 | ||||
-rw-r--r-- | src/core/lib/support/env_posix.cc | 4 | ||||
-rw-r--r-- | src/core/lib/support/fork.cc | 2 | ||||
-rw-r--r-- | src/core/lib/support/log_posix.cc | 8 | ||||
-rw-r--r-- | src/core/lib/support/time_posix.cc | 2 | ||||
-rw-r--r-- | src/core/lib/transport/error_utils.cc | 2 |
8 files changed, 12 insertions, 12 deletions
diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index 8f8d518def..5c6007c3c7 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -111,7 +111,7 @@ class ExecCtx { /** Checks if there is work to be done */ bool HasWork() { - return combiner_data_.active_combiner != NULL || + return combiner_data_.active_combiner != nullptr || !grpc_closure_list_empty(closure_list_); } diff --git a/src/core/lib/iomgr/gethostname_sysconf.cc b/src/core/lib/iomgr/gethostname_sysconf.cc index e099fbd388..3d74e03338 100644 --- a/src/core/lib/iomgr/gethostname_sysconf.cc +++ b/src/core/lib/iomgr/gethostname_sysconf.cc @@ -30,7 +30,7 @@ char* grpc_gethostname() { char* hostname = (char*)gpr_malloc(host_name_max); if (gethostname(hostname, host_name_max) != 0) { gpr_free(hostname); - return NULL; + return nullptr; } return hostname; } diff --git a/src/core/lib/iomgr/wakeup_fd_nospecial.cc b/src/core/lib/iomgr/wakeup_fd_nospecial.cc index 4c20b8c1b7..c2b525a254 100644 --- a/src/core/lib/iomgr/wakeup_fd_nospecial.cc +++ b/src/core/lib/iomgr/wakeup_fd_nospecial.cc @@ -31,6 +31,6 @@ static int check_availability_invalid(void) { return 0; } const grpc_wakeup_fd_vtable grpc_specialized_wakeup_fd_vtable = { - NULL, NULL, NULL, NULL, check_availability_invalid}; + nullptr, nullptr, nullptr, nullptr, check_availability_invalid}; #endif /* GRPC_POSIX_NO_SPECIAL_WAKEUP_FD */ diff --git a/src/core/lib/support/env_posix.cc b/src/core/lib/support/env_posix.cc index 7bea31ca55..8146330555 100644 --- a/src/core/lib/support/env_posix.cc +++ b/src/core/lib/support/env_posix.cc @@ -31,12 +31,12 @@ const char* gpr_getenv_silent(const char* name, char** dst) { *dst = gpr_getenv(name); - return NULL; + return nullptr; } char* gpr_getenv(const char* name) { char* result = getenv(name); - return result == NULL ? result : gpr_strdup(result); + return result == nullptr ? result : gpr_strdup(result); } void gpr_setenv(const char* name, const char* value) { diff --git a/src/core/lib/support/fork.cc b/src/core/lib/support/fork.cc index d59ca5584c..dc291c4080 100644 --- a/src/core/lib/support/fork.cc +++ b/src/core/lib/support/fork.cc @@ -39,7 +39,7 @@ void grpc_fork_support_init() { #else fork_support_enabled = 0; char* env = gpr_getenv("GRPC_ENABLE_FORK_SUPPORT"); - if (env != NULL) { + if (env != nullptr) { static const char* truthy[] = {"yes", "Yes", "YES", "true", "True", "TRUE", "1"}; for (size_t i = 0; i < GPR_ARRAY_SIZE(truthy); i++) { diff --git a/src/core/lib/support/log_posix.cc b/src/core/lib/support/log_posix.cc index 9fab480a8d..6f93cdefcd 100644 --- a/src/core/lib/support/log_posix.cc +++ b/src/core/lib/support/log_posix.cc @@ -35,15 +35,15 @@ static intptr_t gettid(void) { return (intptr_t)pthread_self(); } void gpr_log(const char* file, int line, gpr_log_severity severity, const char* format, ...) { char buf[64]; - char* allocated = NULL; - char* message = NULL; + char* allocated = nullptr; + char* message = nullptr; int ret; va_list args; va_start(args, format); ret = vsnprintf(buf, sizeof(buf), format, args); va_end(args); if (ret < 0) { - message = NULL; + message = nullptr; } else if ((size_t)ret <= sizeof(buf) - 1) { message = buf; } else { @@ -66,7 +66,7 @@ void gpr_default_log(gpr_log_func_args* args) { timer = (time_t)now.tv_sec; final_slash = strrchr(args->file, '/'); - if (final_slash == NULL) + if (final_slash == nullptr) display_file = args->file; else display_file = final_slash + 1; diff --git a/src/core/lib/support/time_posix.cc b/src/core/lib/support/time_posix.cc index 47a849480f..b2087c93cf 100644 --- a/src/core/lib/support/time_posix.cc +++ b/src/core/lib/support/time_posix.cc @@ -107,7 +107,7 @@ static gpr_timespec now_impl(gpr_clock_type clock) { now.clock_type = clock; switch (clock) { case GPR_CLOCK_REALTIME: - gettimeofday(&now_tv, NULL); + gettimeofday(&now_tv, nullptr); now.tv_sec = now_tv.tv_sec; now.tv_nsec = now_tv.tv_usec * 1000; break; diff --git a/src/core/lib/transport/error_utils.cc b/src/core/lib/transport/error_utils.cc index ffaf327081..891576f4ba 100644 --- a/src/core/lib/transport/error_utils.cc +++ b/src/core/lib/transport/error_utils.cc @@ -70,7 +70,7 @@ void grpc_error_get_status(grpc_error* error, grpc_millis deadline, } if (code != nullptr) *code = status; - if (error_string != NULL && status != GRPC_STATUS_OK) { + if (error_string != nullptr && status != GRPC_STATUS_OK) { *error_string = gpr_strdup(grpc_error_string(error)); } |