瀏覽代碼

initialize result before passing it to FindFile()

git-svn-id: trunk@40217 -
Károly Balogh 6 年之前
父節點
當前提交
12a22b593d
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      compiler/systems/t_bsd.pas

+ 2 - 2
compiler/systems/t_bsd.pas

@@ -373,14 +373,14 @@ Function TLinkerBSD.GetDarwinPrtobjName(isdll: boolean): TCmdStr;
 var
   startupfile: TCmdStr;
 begin
+  result:='';
+
   startupfile:=GetDarwinCrt1ObjName(isdll);
   if startupfile<>'' then
     begin
      if not librarysearchpath.FindFile(startupfile,false,result) then
        result:='/usr/lib/'+startupfile
     end
-  else
-    result:='';
   result:=maybequoted(result);
 end;