diff options
Diffstat (limited to 'src/core/lib/support/string_posix.cc')
-rw-r--r-- | src/core/lib/support/string_posix.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/core/lib/support/string_posix.cc b/src/core/lib/support/string_posix.cc index 79c81656cc..8b818e39b9 100644 --- a/src/core/lib/support/string_posix.cc +++ b/src/core/lib/support/string_posix.cc @@ -38,13 +38,13 @@ int gpr_asprintf(char** strp, const char* format, ...) { ret = vsnprintf(buf, sizeof(buf), format, args); va_end(args); if (ret < 0) { - *strp = NULL; + *strp = nullptr; return -1; } /* Allocate a new buffer, with space for the NUL terminator. */ strp_buflen = (size_t)ret + 1; - if ((*strp = (char*)gpr_malloc(strp_buflen)) == NULL) { + if ((*strp = (char*)gpr_malloc(strp_buflen)) == nullptr) { /* This shouldn't happen, because gpr_malloc() calls abort(). */ return -1; } @@ -65,7 +65,7 @@ int gpr_asprintf(char** strp, const char* format, ...) { /* This should never happen. */ gpr_free(*strp); - *strp = NULL; + *strp = nullptr; return -1; } |