Questionable codes

From: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Questionable codes
Date: 1999-12-14 08:54:54
Message-ID: 19991214175454Y.t-ishii@sra.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I have found a few questionable codings. I'm not sure if it really
hurts anything. Suggestions are welcome.

1) in storage/lmgr/lock.c: LockShmemSize()

size += MAXALIGN(maxBackends * sizeof(PROC)); /* each MyProc */
size += MAXALIGN(maxBackends * sizeof(LOCKMETHODCTL)); /* each

shouldn't be:

size += maxBackends * MAXALIGN(sizeof(PROC)); /* each MyProc */
size += maxBackends * MAXALIGN(sizeof(LOCKMETHODCTL)); /* each

2) in utils/hash/dynahash.c:hash_search():

Assert(saveState.currElem && !(saveState.currElem = 0));

Does anybody know what it is for?
--
Tatsuo Ishii

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Hiroshi Inoue 1999-12-14 08:58:57 RE: [HACKERS] Volunteer: Large Tuples / Tuple chaining
Previous Message Thomas Lockhart 1999-12-14 07:35:43 Re: [HACKERS] UNICODE characters vs. BINARY