From 447bcffb94ff5e47ca0ee40c8b034f061aa85201 Mon Sep 17 00:00:00 2001 From: "mscott@netscape.com" Date: Thu, 1 Apr 1999 01:22:47 +0000 Subject: [PATCH] Fix for scottip. Initialize return value to NS_OK for nsStreamListenerProxy::OnDataAvailable. This was causing some failures on release builds and purify builds in particular because there was a particular case in one of the clauses where it would rely on rv which was unitialized. --- network/module/nsNetThread.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/network/module/nsNetThread.cpp b/network/module/nsNetThread.cpp index a0e8ff91a23a..a83612ad9811 100644 --- a/network/module/nsNetThread.cpp +++ b/network/module/nsNetThread.cpp @@ -790,7 +790,7 @@ NS_IMETHODIMP nsStreamListenerProxy::OnDataAvailable(nsIURL* aURL, nsIInputStream *aIStream, PRUint32 aLength) { - nsresult rv; + nsresult rv = NS_OK; if (PR_GetCurrentThread() == gNetlibThread) { OnDataAvailableProxyEvent* ev; @@ -808,7 +808,7 @@ nsStreamListenerProxy::OnDataAvailable(nsIURL* aURL, nsIInputStream *aIStream, } } } else { - mRealListener->OnDataAvailable(aURL, aIStream, aLength); + rv = mRealListener->OnDataAvailable(aURL, aIStream, aLength); } return rv; }