1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-02 04:21:28 +03:00

Clean up locktable init code per recent gripe from Kurt Roeckx.

No change in behavior, but old code would have failed to detect
overrun of MAX_LOCKMODES.
This commit is contained in:
Tom Lane
2003-08-17 22:41:12 +00:00
parent c771838106
commit de9c553f6b
2 changed files with 9 additions and 10 deletions

View File

@@ -8,7 +8,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.58 2003/08/04 02:40:03 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.59 2003/08/17 22:41:12 tgl Exp $
*
*-------------------------------------------------------------------------
*/
@@ -76,8 +76,10 @@ InitLockTable(int maxBackends)
{
int lockmethod;
/* number of lock modes is lengthof()-1 because of dummy zero */
lockmethod = LockMethodTableInit("LockTable",
LockConflicts, MAX_LOCKMODES - 1,
LockConflicts,
lengthof(LockConflicts) - 1,
maxBackends);
LockTableId = lockmethod;