mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-26 22:32:46 +00:00
fix for bug 119220 - Occurances of uninitialized variables being used before being set, r=dougt, sr=darin
This commit is contained in:
parent
9445831f73
commit
3e0aa934af
@ -60,7 +60,7 @@ NS_ReadLine (nsIInputStream* aStream, nsLineBuffer * aBuffer,
|
||||
nsAutoString temp;
|
||||
*more = PR_TRUE;
|
||||
PRBool eolStarted = PR_FALSE;
|
||||
char eolchar;
|
||||
char eolchar = '\0';
|
||||
aLine.Truncate();
|
||||
while (1) { // will be returning out of this loop on eol or eof
|
||||
if (aBuffer->empty) { // buffer is empty. Read into it.
|
||||
|
@ -929,7 +929,7 @@ nsFileTransport::Process(nsIProgressEventSink *progressSink)
|
||||
if (mTransferAmount >= 0)
|
||||
transferAmt = PR_MIN(transferAmt, (PRUint32)mTransferAmount);
|
||||
|
||||
PRUint32 total, offset = mSinkWrapper->GetBytesWritten();
|
||||
PRUint32 total = 0, offset = mSinkWrapper->GetBytesWritten();
|
||||
|
||||
// Ask the provider for data
|
||||
nsresult status = mProvider->OnDataWritable(this, mContext,
|
||||
|
@ -927,7 +927,7 @@ nsFTPDirListingConv::DigestBufferLines(char *aBuffer, nsCString &aString) {
|
||||
int flagcwd = 0;
|
||||
int when = 0;
|
||||
int flagsize = 0;
|
||||
unsigned long size;
|
||||
unsigned long size = 0;
|
||||
PRBool processing = PR_TRUE;
|
||||
while (*line && processing)
|
||||
switch (*line) {
|
||||
|
@ -195,7 +195,7 @@ MyListener::OnDataAvailable(nsIRequest *req, nsISupports *ctxt,
|
||||
PRUint32 offset, PRUint32 count)
|
||||
{
|
||||
//printf(">>> OnDataAvailable [count=%u]\n", count);
|
||||
nsresult rv;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
PRUint32 bytesRead=0;
|
||||
int i=0;
|
||||
char buf[1024];
|
||||
|
@ -419,7 +419,7 @@ TestConnection::Run(void)
|
||||
|
||||
nsresult TestConnection::WriteBuffer(void)
|
||||
{
|
||||
nsresult rv;
|
||||
nsresult rv = NS_ERROR_FAILURE;
|
||||
char *buffer;
|
||||
PRInt32 size;
|
||||
PRUint32 bytesWritten;
|
||||
|
Loading…
Reference in New Issue
Block a user