From 0b0bb227b980546042b4103aef53a92505eb7b86 Mon Sep 17 00:00:00 2001 From: "alecf%netscape.com" Date: Tue, 4 May 1999 20:49:20 +0000 Subject: [PATCH] fix possible uninitialized variable --- base/src/nsIStringStream.cpp | 2 +- xpcom/io/nsIStringStream.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/base/src/nsIStringStream.cpp b/base/src/nsIStringStream.cpp index 26355091eb93..f250c575e2f7 100644 --- a/base/src/nsIStringStream.cpp +++ b/base/src/nsIStringStream.cpp @@ -356,7 +356,7 @@ NS_IMETHODIMP BasicStringImpl::Seek(PRSeekWhence whence, PRInt32 offset) mLastResult = NS_OK; // reset on a seek. mEOF = PR_FALSE; // reset on a seek. PRInt32 fileSize = length(); - PRInt32 newPosition; + PRInt32 newPosition=-1; switch (whence) { case PR_SEEK_CUR: newPosition = mOffset + offset; break; diff --git a/xpcom/io/nsIStringStream.cpp b/xpcom/io/nsIStringStream.cpp index 26355091eb93..f250c575e2f7 100644 --- a/xpcom/io/nsIStringStream.cpp +++ b/xpcom/io/nsIStringStream.cpp @@ -356,7 +356,7 @@ NS_IMETHODIMP BasicStringImpl::Seek(PRSeekWhence whence, PRInt32 offset) mLastResult = NS_OK; // reset on a seek. mEOF = PR_FALSE; // reset on a seek. PRInt32 fileSize = length(); - PRInt32 newPosition; + PRInt32 newPosition=-1; switch (whence) { case PR_SEEK_CUR: newPosition = mOffset + offset; break;