Skip to content

Commit bf9a55c

Browse files
committedDec 15, 2021
pg_checksums: Fix data type
Segment numbers should be int, not BlockNumber (see also buffile.c). Likely no harm, but better for consistency.
1 parent 22bd3cb commit bf9a55c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed
 

‎src/bin/pg_checksums/pg_checksums.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ skipfile(const char *fn)
192192
}
193193

194194
static void
195-
scan_file(const char *fn, BlockNumber segmentno)
195+
scan_file(const char *fn, int segmentno)
196196
{
197197
PGAlignedBlock buf;
198198
PageHeader header = (PageHeader) buf.data;
@@ -370,7 +370,7 @@ scan_directory(const char *basedir, const char *subdir, bool sizeonly)
370370
char fnonly[MAXPGPATH];
371371
char *forkpath,
372372
*segmentpath;
373-
BlockNumber segmentno = 0;
373+
int segmentno = 0;
374374

375375
if (skipfile(de->d_name))
376376
continue;

0 commit comments

Comments
 (0)