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

Commit10eae82

Browse files
committed
Fix thinko in assertion in basebackup.c.
Commit5a1007a tried to introducean assertion that the block size was at least twice the size of atar block, but I got the math wrong. My error was reported to meoff-list.
1 parenta27048c commit10eae82

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎src/backend/replication/basebackup.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,7 @@ perform_base_backup(basebackup_options *opt, bbsink *sink)
376376
else
377377
{
378378
/* Properly terminate the tarfile. */
379-
StaticAssertStmt(TAR_BLOCK_SIZE <=2*BLCKSZ,
379+
StaticAssertStmt(2*TAR_BLOCK_SIZE <=BLCKSZ,
380380
"BLCKSZ too small for 2 tar blocks");
381381
memset(sink->bbs_buffer,0,2*TAR_BLOCK_SIZE);
382382
bbsink_archive_contents(sink,2*TAR_BLOCK_SIZE);
@@ -621,7 +621,7 @@ perform_base_backup(basebackup_options *opt, bbsink *sink)
621621
}
622622

623623
/* Properly terminate the tar file. */
624-
StaticAssertStmt(TAR_BLOCK_SIZE <=2*BLCKSZ,
624+
StaticAssertStmt(2*TAR_BLOCK_SIZE <=BLCKSZ,
625625
"BLCKSZ too small for 2 tar blocks");
626626
memset(sink->bbs_buffer,0,2*TAR_BLOCK_SIZE);
627627
bbsink_archive_contents(sink,2*TAR_BLOCK_SIZE);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp