Replace NULL with nullptr

Also fixed some lines that were too long, and a few other minor
details.

Change-Id: I6efba5fb6e03eb5d0a300fddb2a75bf8e2f175cb
diff --git a/runtime/base/scoped_flock.cc b/runtime/base/scoped_flock.cc
index 0e93eee..71e0590 100644
--- a/runtime/base/scoped_flock.cc
+++ b/runtime/base/scoped_flock.cc
@@ -31,7 +31,7 @@
       UNUSED(file_->FlushCloseOrErase());  // Ignore result.
     }
     file_.reset(OS::OpenFileWithFlags(filename, O_CREAT | O_RDWR));
-    if (file_.get() == NULL) {
+    if (file_.get() == nullptr) {
       *error_msg = StringPrintf("Failed to open file '%s': %s", filename, strerror(errno));
       return false;
     }
@@ -71,14 +71,15 @@
   }
   if (0 != TEMP_FAILURE_RETRY(flock(file_->Fd(), LOCK_EX))) {
     file_.reset();
-    *error_msg = StringPrintf("Failed to lock file '%s': %s", file->GetPath().c_str(), strerror(errno));
+    *error_msg = StringPrintf(
+        "Failed to lock file '%s': %s", file->GetPath().c_str(), strerror(errno));
     return false;
   }
   return true;
 }
 
 File* ScopedFlock::GetFile() {
-  CHECK(file_.get() != NULL);
+  CHECK(file_.get() != nullptr);
   return file_.get();
 }
 
@@ -89,7 +90,7 @@
 ScopedFlock::ScopedFlock() { }
 
 ScopedFlock::~ScopedFlock() {
-  if (file_.get() != NULL) {
+  if (file_.get() != nullptr) {
     int flock_result = TEMP_FAILURE_RETRY(flock(file_->Fd(), LOCK_UN));
     CHECK_EQ(0, flock_result);
     if (file_->FlushCloseOrErase() != 0) {