Simplify. NFC.

llvm-svn: 318104
diff --git a/llvm/lib/Support/LockFileManager.cpp b/llvm/lib/Support/LockFileManager.cpp
index 81f3fd0..ad749e0 100644
--- a/llvm/lib/Support/LockFileManager.cpp
+++ b/llvm/lib/Support/LockFileManager.cpp
@@ -273,9 +273,8 @@
     std::string ErrCodeMsg = Error->message();
     raw_string_ostream OSS(Str);
     if (!ErrCodeMsg.empty())
-      OSS << ": " << Error->message();
-    OSS.flush();
-    return Str;
+      OSS << ": " << ErrCodeMsg;
+    return OSS.str();
   }
   return "";
 }