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

Commit2de3c10

Browse files
committed
Fix datatype confusion in logtape.c's right_offset().
This could only matter if (a) long is wider than int, and (b) the heapof free blocks exceeds UINT_MAX entries, which seems pretty unlikely.Still, it's a theoretical bug, so backpatch to v13 where the typo camein (in commitc02fdc9).In passing, also make swap_nodes() use consistent datatypes.Ma LiangzhuDiscussion:https://postgr.es/m/17336-fc4e522d26a750fd@postgresql.org
1 parentece8c76 commit2de3c10

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/utils/sort/logtape.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ ltsReadFillBuffer(LogicalTape *lt)
343343
staticinlinevoid
344344
swap_nodes(long*heap,unsigned longa,unsigned longb)
345345
{
346-
unsignedlongswap;
346+
longswap;
347347

348348
swap=heap[a];
349349
heap[a]=heap[b];
@@ -357,7 +357,7 @@ left_offset(unsigned long i)
357357
}
358358

359359
staticinlineunsigned long
360-
right_offset(unsignedi)
360+
right_offset(unsignedlongi)
361361
{
362362
return2*i+2;
363363
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp