fix possible uninitialized variable

This commit is contained in:
alecf%netscape.com 1999-05-04 20:49:20 +00:00
parent 5a0ff8598d
commit 0b0bb227b9
2 changed files with 2 additions and 2 deletions

View File

@ -356,7 +356,7 @@ NS_IMETHODIMP BasicStringImpl::Seek(PRSeekWhence whence, PRInt32 offset)
mLastResult = NS_OK; // reset on a seek. mLastResult = NS_OK; // reset on a seek.
mEOF = PR_FALSE; // reset on a seek. mEOF = PR_FALSE; // reset on a seek.
PRInt32 fileSize = length(); PRInt32 fileSize = length();
PRInt32 newPosition; PRInt32 newPosition=-1;
switch (whence) switch (whence)
{ {
case PR_SEEK_CUR: newPosition = mOffset + offset; break; case PR_SEEK_CUR: newPosition = mOffset + offset; break;

View File

@ -356,7 +356,7 @@ NS_IMETHODIMP BasicStringImpl::Seek(PRSeekWhence whence, PRInt32 offset)
mLastResult = NS_OK; // reset on a seek. mLastResult = NS_OK; // reset on a seek.
mEOF = PR_FALSE; // reset on a seek. mEOF = PR_FALSE; // reset on a seek.
PRInt32 fileSize = length(); PRInt32 fileSize = length();
PRInt32 newPosition; PRInt32 newPosition=-1;
switch (whence) switch (whence)
{ {
case PR_SEEK_CUR: newPosition = mOffset + offset; break; case PR_SEEK_CUR: newPosition = mOffset + offset; break;