Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(20)

Unified Diff: content/common/set_process_title_linux.cc

Issue 649533003: C++11 declares a type safe null pointer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Presubmit errors Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/common/set_process_title.h ('k') | content/common/shareable_file_reference_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/set_process_title_linux.cc
diff --git a/content/common/set_process_title_linux.cc b/content/common/set_process_title_linux.cc
index c5043806c11df10db83ea41d0f30a990426eb2d1..b6bfa5b5a9deeb7a59ad442299a255c758d22484 100644
--- a/content/common/set_process_title_linux.cc
+++ b/content/common/set_process_title_linux.cc
@@ -9,7 +9,7 @@
// environment variables to processes. First, there are two char* arrays stored
// one after another: argv and environ. A pointer to argv is passed to main(),
// while glibc sets the global variable |environ| to point at the latter. Both
-// of these arrays are terminated by a NULL pointer; the environment array is
+// of these arrays are terminated by a nullptr pointer; the environment array is
// also followed by some empty space to allow additional variables to be added.
//
// These arrays contain pointers to a second location in memory, where the
@@ -47,15 +47,15 @@
extern char** environ;
-static char** g_main_argv = NULL;
-static char* g_orig_argv0 = NULL;
+static char** g_main_argv = nullptr;
+static char* g_orig_argv0 = nullptr;
void setproctitle(const char* fmt, ...) {
va_list ap;
size_t i, avail_size;
uintptr_t page_size, page, page_end;
// Sanity check before we try and set the process title.
- // The BSD version allows fmt == NULL to restore the original title.
+ // The BSD version allows fmt == nullptr to restore the original title.
if (!g_main_argv || !environ || !fmt)
return;
if (!g_orig_argv0) {
@@ -98,7 +98,7 @@ void setproctitle(const char* fmt, ...) {
vsnprintf(g_main_argv[0] + size, avail_size - size, fmt, ap);
}
va_end(ap);
- g_main_argv[1] = NULL;
+ g_main_argv[1] = nullptr;
}
// A version of this built into glibc would not need this function, since
« no previous file with comments | « content/common/set_process_title.h ('k') | content/common/shareable_file_reference_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698