diff --git a/layout/base/nsFrameTraversal.cpp b/layout/base/nsFrameTraversal.cpp index b228fe0bb590..10069b2c4cfb 100644 --- a/layout/base/nsFrameTraversal.cpp +++ b/layout/base/nsFrameTraversal.cpp @@ -784,8 +784,7 @@ NS_IMETHODIMP result = parent; break; } - else if ((result = parent->GetParent()) != nsnull) { - result = nsnull; + else if (!(result = parent->GetParent())) { break; } else diff --git a/layout/base/src/nsFrameTraversal.cpp b/layout/base/src/nsFrameTraversal.cpp index b228fe0bb590..10069b2c4cfb 100644 --- a/layout/base/src/nsFrameTraversal.cpp +++ b/layout/base/src/nsFrameTraversal.cpp @@ -784,8 +784,7 @@ NS_IMETHODIMP result = parent; break; } - else if ((result = parent->GetParent()) != nsnull) { - result = nsnull; + else if (!(result = parent->GetParent())) { break; } else