1
0
mirror of https://github.com/postgres/postgres.git synced 2025-07-31 22:04:40 +03:00

Replace magic constants for seek() calls in perl scripts

A couple of tests have been using 0 as magic constant while SEEK_SET can
be used instead.  This makes the code easier to understand, and more
consistent with the changes done in 3c5b068.

Per discussion with Andrew Dunstan.

Discussion: https://postgr.es/m/YHrc24AgJQ6tQ1q0@paquier.xyz
This commit is contained in:
Michael Paquier
2021-04-19 10:15:35 +09:00
parent 8e861eaae8
commit c731f9187b
5 changed files with 15 additions and 8 deletions

View File

@ -4,6 +4,7 @@ use warnings;
use PostgresNode;
use TestLib;
use Fcntl qw(:seek);
use Test::More tests => 80;
my ($node, $result);
@ -124,7 +125,7 @@ sub corrupt_first_page
# Corrupt some line pointers. The values are chosen to hit the
# various line-pointer-corruption checks in verify_heapam.c
# on both little-endian and big-endian architectures.
seek($fh, 32, 0)
seek($fh, 32, SEEK_SET)
or BAIL_OUT("seek failed: $!");
syswrite(
$fh,