summaryrefslogtreecommitdiff
path: root/svl
diff options
context:
space:
mode:
Diffstat (limited to 'svl')
-rw-r--r--svl/source/misc/inethist.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/svl/source/misc/inethist.cxx b/svl/source/misc/inethist.cxx
index 5dafe30d2ce2..19cae51df5ad 100644
--- a/svl/source/misc/inethist.cxx
+++ b/svl/source/misc/inethist.cxx
@@ -254,16 +254,10 @@ void INetURLHistory_Impl::putUrl (const OUString &rUrl)
// Check source and destination.
sal_uInt16 nDI = std::min (k, sal_uInt16(capacity() - 1));
- if (nSI < nDI)
- {
- if (!(m_pHash[nDI] < h))
- nDI -= 1;
- }
- if (nDI < nSI)
- {
- if (m_pHash[nDI] < h)
- nDI += 1;
- }
+ if (nSI < nDI && !(m_pHash[nDI] < h))
+ nDI -= 1;
+ if (nDI < nSI && m_pHash[nDI] < h)
+ nDI += 1;
// Assign data.
m_pList[m_aHead.m_nNext].m_nHash = m_pHash[nSI].m_nHash = h;