浏览代码

ENH: fix warning and code style

Bill Hoffman 19 年之前
父节点
当前提交
c3148813f4
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      Source/CPack/OSXScriptLauncher.cxx

+ 5 - 3
Source/CPack/OSXScriptLauncher.cxx

@@ -69,10 +69,12 @@ int main(int argc, char* argv[])
     return 1;
     return 1;
     }
     }
 
 
-  OSErr err = noErr;
-
   //create file reference from file spec
   //create file reference from file spec
-  if (err = FSpMakeFSRef(&fileSpec, &fileRef)) return err;
+  OSErr err = FSpMakeFSRef(&fileSpec, &fileRef);
+  if(err) 
+    {
+    return err;
+    }
 
 
   // and then convert the FSRef to a path
   // and then convert the FSRef to a path
   if ( FSRefMakePath(&fileRef, path, MaximumPathLength) )
   if ( FSRefMakePath(&fileRef, path, MaximumPathLength) )