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:
@ -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,
|
||||
|
Reference in New Issue
Block a user