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_library.cc b/metrics/metrics_library.cc
index ac97c3e..c352bcf 100644
--- a/metrics/metrics_library.cc
+++ b/metrics/metrics_library.cc
@@ -59,7 +59,7 @@
                                      char* buffer,
                                      int buffer_size,
                                      bool* result) {
-  if (buffer == NULL || buffer_size < 1)
+  if (buffer == nullptr || buffer_size < 1)
     return false;
   int mounts_fd = open(mounts_file, O_RDONLY);
   if (mounts_fd < 0)
@@ -121,7 +121,7 @@
 
 bool MetricsLibrary::AreMetricsEnabled() {
   static struct stat stat_buffer;
-  time_t this_check_time = time(NULL);
+  time_t this_check_time = time(nullptr);
   if (this_check_time != cached_enabled_time_) {
     cached_enabled_time_ = this_check_time;
 
@@ -157,7 +157,7 @@
 
 bool MetricsLibrary::SendToAutotest(const std::string& name, int value) {
   FILE* autotest_file = fopen(kAutotestPath, "a+");
-  if (autotest_file == NULL) {
+  if (autotest_file == nullptr) {
     PLOG(ERROR) << kAutotestPath << ": fopen";
     return false;
   }