From d3e73b4f6b758896e6328cf2f5dc7d864d27949e Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Thu, 1 Jun 2017 15:36:38 +0200 Subject: Fix typo in QMutex's free-list's Sizes[3] A QFreeList's MaxIndex is clearly meant to be the sum of its Sizes; but the parentheses in MaxIndex - (16 - 128 - 1024) doesn't give the same as without the parentheses. Noticed while reviewing a copy of this code now used by QReadWriteLock (which has this fix). Change-Id: I9f68171475b3c6edc18896056b5532183fee92b2 Reviewed-by: Sean Harmer Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/corelib/thread/qmutex.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/corelib/thread/qmutex.cpp') diff --git a/src/corelib/thread/qmutex.cpp b/src/corelib/thread/qmutex.cpp index 7e3610f0b3..3e7033451e 100644 --- a/src/corelib/thread/qmutex.cpp +++ b/src/corelib/thread/qmutex.cpp @@ -642,7 +642,7 @@ const int FreeListConstants::Sizes[FreeListConstants::BlockCount] = { 16, 128, 1024, - FreeListConstants::MaxIndex - (16-128-1024) + FreeListConstants::MaxIndex - (16 + 128 + 1024) }; typedef QFreeList FreeList; -- cgit v1.2.3