Skip to content

Commit da0f058

Browse files
committed
Make lwlocknames.h generated file less ugly
We can make the output look a bit better by aligning each lock's definition, so add some padding space to achieve that. This change makes no practical difference, but casual onlookers will be less distracted by (lack of) whitespace. Author: Gurjeet Singh <[email protected]> Discussion: https://postgr.es/m/CABwTF4VxfwDtRV-H22_XK4XeDogaV-Vaobu+af5U=8ZAZn9ZZQ@mail.gmail.com
1 parent 0697b23 commit da0f058

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/backend/storage/lmgr/generate-lwlocknames.pl

+2-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,8 @@
108108
$continue = ",\n";
109109

110110
# Add a "Lock" suffix to each lock name, as the C code depends on that
111-
print $h "#define ${lockname}Lock (&MainLWLockArray[$lockidx].lock)\n";
111+
printf $h "#define %-32s (&MainLWLockArray[$lockidx].lock)\n",
112+
$lockname . "Lock";
112113
}
113114

114115
die

0 commit comments

Comments
 (0)