platform2: Replace NULL with nullptr in minor components
Replace NULL with nullptr in C++11-enabled components of platform2
that don't have too many occurrences of NULL. Other major
"offenders" will be handled separately.
BUG=None
TEST=FEATURES=test emerge-link app-shell-launcher buffet easy-unlock platform2 metrics wimax_manager
Change-Id: I61b25a057e3d6865908bc74f9f3d4cb55e08af26
Reviewed-on: https://chromium-review.googlesource.com/214837
Tested-by: Alex Vakulenko <avakulenko@chromium.org>
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Alex Vakulenko <avakulenko@chromium.org>
diff --git a/metrics/metrics_daemon.cc b/metrics/metrics_daemon.cc
index 9e0bf04..0552adb 100644
--- a/metrics/metrics_daemon.cc
+++ b/metrics/metrics_daemon.cc
@@ -215,7 +215,7 @@
const string& scaling_max_freq_path,
const string& cpuinfo_max_freq_path) {
testing_ = testing;
- DCHECK(metrics_lib != NULL);
+ DCHECK(metrics_lib != nullptr);
metrics_lib_ = metrics_lib;
// Get ticks per second (HZ) on this system.
@@ -284,7 +284,7 @@
LOG_IF(FATAL, dbus_error_is_set(&error)) <<
"No D-Bus connection: " << SAFE_MESSAGE(error);
- dbus_connection_setup_with_g_main(connection, NULL);
+ dbus_connection_setup_with_g_main(connection, nullptr);
vector<string> matches;
matches.push_back(
@@ -305,7 +305,7 @@
// Adds the D-Bus filter routine to be called back whenever one of
// the registered D-Bus matches is successful. The daemon is not
// activated for D-Bus messages that don't match.
- CHECK(dbus_connection_add_filter(connection, MessageFilter, this, NULL));
+ CHECK(dbus_connection_add_filter(connection, MessageFilter, this, nullptr));
update_stats_timeout_id_ =
g_timeout_add(kUpdateStatsIntervalMs, &HandleUpdateStatsTimeout, this);
@@ -317,7 +317,7 @@
}
void MetricsDaemon::Loop() {
- GMainLoop* loop = g_main_loop_new(NULL, false);
+ GMainLoop* loop = g_main_loop_new(nullptr, false);
g_main_loop_run(loop);
}