Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit9598afa

Browse files
committed
Fix one overflow and one signedness error, caused by the patch to calculate
OLDSERXID_MAX_PAGE based on BLCKSZ. MSVC compiler warned about these.
1 parent7544064 commit9598afa

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/storage/lmgr/predicate.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,7 @@ static SlruCtlData OldSerXidSlruCtlData;
311311
* transactions and the maximum that SLRU supports.
312312
*/
313313
#defineOLDSERXID_MAX_PAGEMin(SLRU_PAGES_PER_SEGMENT * 0x10000 - 1, \
314-
(MaxTransactionId + 1) / OLDSERXID_ENTRIESPERPAGE - 1)
314+
(MaxTransactionId) / OLDSERXID_ENTRIESPERPAGE)
315315

316316
#defineOldSerXidNextPage(page) (((page) >= OLDSERXID_MAX_PAGE) ? 0 : (page) + 1)
317317

@@ -767,7 +767,7 @@ OldSerXidPagePrecedesLogically(int p, int q)
767767
diff=p-q;
768768
if (diff >= ((OLDSERXID_MAX_PAGE+1) /2))
769769
diff-=OLDSERXID_MAX_PAGE+1;
770-
elseif (diff<-((OLDSERXID_MAX_PAGE+1) /2))
770+
elseif (diff<-((int) (OLDSERXID_MAX_PAGE+1) /2))
771771
diff+=OLDSERXID_MAX_PAGE+1;
772772
returndiff<0;
773773
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp