[llvm-commits] [llvm] r98350 - /llvm/trunk/lib/System/Win32/Path.inc

Kovarththanan Rajaratnam kovarththanan.rajaratnam at gmail.com
Fri Mar 12 06:17:25 PST 2010


Author: krj
Date: Fri Mar 12 08:17:24 2010
New Revision: 98350

URL: http://llvm.org/viewvc/llvm-project?rev=98350&view=rev
Log:
Remove superfluous NULL assignment

Modified:
    llvm/trunk/lib/System/Win32/Path.inc

Modified: llvm/trunk/lib/System/Win32/Path.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Win32/Path.inc?rev=98350&r1=98349&r2=98350&view=diff
==============================================================================
--- llvm/trunk/lib/System/Win32/Path.inc (original)
+++ llvm/trunk/lib/System/Win32/Path.inc Fri Mar 12 08:17:24 2010
@@ -126,7 +126,7 @@
 }
 
 void Path::makeAbsolute() {
-  TCHAR  FullPath[MAX_PATH + 1] = {0}; 
+  TCHAR  FullPath[MAX_PATH + 1] = {0};
   LPTSTR FilePart = NULL;
 
   DWORD RetLength = ::GetFullPathNameA(path.c_str(),
@@ -161,7 +161,7 @@
   }
 }
 
-bool 
+bool
 Path::isAbsolute() const {
   // FIXME: This does not handle correctly an absolute path starting from
   // a drive letter or in UNC format.
@@ -174,9 +174,9 @@
     default:
       return path[0] == '/' || (path[1] == ':' && path[2] == '/');
   }
-} 
+}
 
-static Path *TempDirectory = NULL;
+static Path *TempDirectory;
 
 Path
 Path::GetTemporaryDirectory(std::string* ErrMsg) {
@@ -266,7 +266,7 @@
 Path::GetCurrentDirectory() {
   char pathname[MAX_PATH];
   ::GetCurrentDirectoryA(MAX_PATH,pathname);
-  return Path(pathname);  
+  return Path(pathname);
 }
 
 /// GetMainExecutable - Return the path to the main executable, given the
@@ -448,7 +448,7 @@
     MakeErrMsg(ErrMsg, path + ": can't get status of file");
     return true;
   }
-    
+
   if (!(fi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)) {
     if (ErrMsg)
       *ErrMsg = path + ": not a directory";
@@ -617,7 +617,7 @@
       *next = 0;
       if (!CreateDirectory(pathname, NULL) &&
           GetLastError() != ERROR_ALREADY_EXISTS)
-          return MakeErrMsg(ErrMsg, 
+          return MakeErrMsg(ErrMsg,
             std::string(pathname) + ": Can't create directory: ");
       *next++ = '/';
     }
@@ -649,7 +649,7 @@
   WIN32_FILE_ATTRIBUTE_DATA fi;
   if (!GetFileAttributesEx(path.c_str(), GetFileExInfoStandard, &fi))
     return true;
-    
+
   if (fi.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
     // If it doesn't exist, we're done.
     if (!exists())
@@ -706,7 +706,7 @@
 
     pathname[lastchar] = 0;
     if (!RemoveDirectory(pathname))
-      return MakeErrMsg(ErrStr, 
+      return MakeErrMsg(ErrStr,
         std::string(pathname) + ": Can't destroy directory: ");
     return false;
   } else {
@@ -753,7 +753,7 @@
 bool
 Path::renamePathOnDisk(const Path& newName, std::string* ErrMsg) {
   if (!MoveFileEx(path.c_str(), newName.c_str(), MOVEFILE_REPLACE_EXISTING))
-    return MakeErrMsg(ErrMsg, "Can't move '" + path + "' to '" + newName.path 
+    return MakeErrMsg(ErrMsg, "Can't move '" + path + "' to '" + newName.path
         + "': ");
   return false;
 }
@@ -764,7 +764,7 @@
   if (!si.isFile) {
     return true;
   }
-  
+
   HANDLE h = CreateFile(path.c_str(),
                         FILE_READ_ATTRIBUTES | FILE_WRITE_ATTRIBUTES,
                         FILE_SHARE_READ | FILE_SHARE_WRITE | FILE_SHARE_DELETE,





More information about the llvm-commits mailing list