From ea4adc76ab33da32eeba9f333ae2a5570e12f138 Mon Sep 17 00:00:00 2001 From: Marco Bonardo Date: Tue, 27 Apr 2010 13:25:20 +0200 Subject: [PATCH] Bug 561848 - signed/unsigned mismatch in nsNavHistoryContainerResultNode::GetChildIndex. r=dietrich --- toolkit/components/places/src/nsNavHistoryResult.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/toolkit/components/places/src/nsNavHistoryResult.cpp b/toolkit/components/places/src/nsNavHistoryResult.cpp index db2da91e9118..34e1efc840dc 100644 --- a/toolkit/components/places/src/nsNavHistoryResult.cpp +++ b/toolkit/components/places/src/nsNavHistoryResult.cpp @@ -1967,10 +1967,11 @@ nsNavHistoryContainerResultNode::GetChildIndex(nsINavHistoryResultNode* aNode, if (!mExpanded) return NS_ERROR_NOT_AVAILABLE; - *_retval = FindChild(static_cast(aNode)); - if (*_retval == -1) + PRInt32 nodeIndex = FindChild(static_cast(aNode)); + if (nodeIndex == -1) return NS_ERROR_INVALID_ARG; + *_retval = nodeIndex; return NS_OK; }