From 16bc0059c31ad22174e7d59fd8e229542621d13d Mon Sep 17 00:00:00 2001 From: "pollmann%netscape.com" Date: Wed, 11 Apr 2001 07:39:48 +0000 Subject: [PATCH] Bug 59675: Initialize variables before use, r=nisheeth@netscape.com, sr=jst@netscape.com git-svn-id: svn://10.0.0.236/trunk@91959 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/layout/forms/nsIsIndexFrame.cpp | 6 ++++-- mozilla/layout/html/forms/src/nsIsIndexFrame.cpp | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/mozilla/layout/forms/nsIsIndexFrame.cpp b/mozilla/layout/forms/nsIsIndexFrame.cpp index 3c597b09620..b6d5bfd2efa 100644 --- a/mozilla/layout/forms/nsIsIndexFrame.cpp +++ b/mozilla/layout/forms/nsIsIndexFrame.cpp @@ -120,9 +120,10 @@ nsIsIndexFrame::Paint(nsIPresContext* aPresContext, NS_IMETHODIMP nsIsIndexFrame::UpdatePromptLabel() { - nsresult result; if (!mTextContent) return NS_ERROR_UNEXPECTED; + nsresult result = NS_OK; + // Get the text from the "prompt" attribute. // If it is zero length, set it to a default value (localized) nsAutoString prompt; @@ -370,11 +371,12 @@ nsIsIndexFrame::GetFrameName(nsString& aResult) const NS_IMETHODIMP nsIsIndexFrame::OnSubmit(nsIPresContext* aPresContext) { - nsresult result; if (!mContent || !mInputContent) { return NS_ERROR_UNEXPECTED; } + nsresult result = NS_OK; + // Begin ProcessAsURLEncoded nsAutoString data; diff --git a/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp b/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp index 3c597b09620..b6d5bfd2efa 100644 --- a/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp +++ b/mozilla/layout/html/forms/src/nsIsIndexFrame.cpp @@ -120,9 +120,10 @@ nsIsIndexFrame::Paint(nsIPresContext* aPresContext, NS_IMETHODIMP nsIsIndexFrame::UpdatePromptLabel() { - nsresult result; if (!mTextContent) return NS_ERROR_UNEXPECTED; + nsresult result = NS_OK; + // Get the text from the "prompt" attribute. // If it is zero length, set it to a default value (localized) nsAutoString prompt; @@ -370,11 +371,12 @@ nsIsIndexFrame::GetFrameName(nsString& aResult) const NS_IMETHODIMP nsIsIndexFrame::OnSubmit(nsIPresContext* aPresContext) { - nsresult result; if (!mContent || !mInputContent) { return NS_ERROR_UNEXPECTED; } + nsresult result = NS_OK; + // Begin ProcessAsURLEncoded nsAutoString data;