variable name change to silence build warning

This commit is contained in:
dveditz%netscape.com 1999-11-13 01:54:12 +00:00
Родитель b7d25b0205
Коммит 0e1d35de83
1 изменённых файлов: 8 добавлений и 9 удалений

Просмотреть файл

@ -199,18 +199,17 @@ PRInt32 ReplaceFileNow(nsFileSpec& replacementFile, nsFileSpec& doomedFile )
// first try to rename the doomed file out of the way (if it exists) // first try to rename the doomed file out of the way (if it exists)
char* leafname; char* leafname;
nsFileSpec tmpfile( doomedFile ); nsFileSpec tmpFile( doomedFile );
if ( tmpfile.Exists() ) if ( tmpFile.Exists() )
{ {
tmpfile.MakeUnique(); tmpFile.MakeUnique();
leafname = tmpfile.GetLeafName(); leafname = tmpFile.GetLeafName();
tmpfile = doomedFile; tmpFile = doomedFile;
tmpfile.Rename( leafname ); tmpFile.Rename( leafname );
nsCRT::free( leafname ); nsCRT::free( leafname );
} }
// if doomedFile is gone move new file into place // if doomedFile is gone move new file into place
nsresult rv; nsresult rv;
if ( !doomedFile.Exists() ) if ( !doomedFile.Exists() )
@ -241,12 +240,12 @@ PRInt32 ReplaceFileNow(nsFileSpec& replacementFile, nsFileSpec& doomedFile )
{ {
// we replaced the old file OK, now we have to // we replaced the old file OK, now we have to
// get rid of it permanently // get rid of it permanently
result = DeleteFileNowOrSchedule( tmpfile ); result = DeleteFileNowOrSchedule( tmpFile );
} }
else else
{ {
// couldn't rename file, try to put old file back // couldn't rename file, try to put old file back
tmpfile.Rename( leafname ); tmpFile.Rename( leafname );
} }
nsCRT::free( leafname ); nsCRT::free( leafname );
} }