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

Commit79e15c7

Browse files
committed
Fix off-by-one in pg_xlogdump -r option.
Because of the bug, -r would not accept the rmgr with the highest ID.
1 parent035a5e1 commit79e15c7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎contrib/pg_xlogdump/pg_xlogdump.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ print_rmgr_list(void)
7575
{
7676
inti;
7777

78-
for (i=0;i<RM_MAX_ID+1;i++)
78+
for (i=0;i <=RM_MAX_ID;i++)
7979
{
8080
printf("%s\n",RmgrDescTable[i].rm_name);
8181
}
@@ -492,7 +492,7 @@ main(int argc, char **argv)
492492
exit(EXIT_SUCCESS);
493493
}
494494

495-
for (i=0;i<RM_MAX_ID;i++)
495+
for (i=0;i <=RM_MAX_ID;i++)
496496
{
497497
if (pg_strcasecmp(optarg,RmgrDescTable[i].rm_name)==0)
498498
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp