pgsql-server: A few minor list-related cleanups: (1) Replace while loop

From: neilc(at)svr1(dot)postgresql(dot)org (Neil Conway)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql-server: A few minor list-related cleanups: (1) Replace while loop
Date: 2004-09-27 04:12:03
Message-ID: 20040927041203.69352329D30@svr1.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Log Message:
-----------
A few minor list-related cleanups:

(1) Replace while loop with the new forboth() construct in
parser/analyze.c

(2) Replace lcons() with lappend() in SearchCatCacheList(). Since these
now have the same performance, there is no reason to prefer lcons() in
this case, and using lappend() leads to cleaner code.

(3) Improve the name of the second parameter to for_each_cell()

Modified Files:
--------------
pgsql-server/src/backend/parser:
analyze.c (r1.311 -> r1.312)
(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/parser/analyze.c.diff?r1=1.311&r2=1.312)
pgsql-server/src/backend/utils/cache:
catcache.c (r1.116 -> r1.117)
(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/backend/utils/cache/catcache.c.diff?r1=1.116&r2=1.117)
pgsql-server/src/include/nodes:
pg_list.h (r1.49 -> r1.50)
(http://developer.postgresql.org/cvsweb.cgi/pgsql-server/src/include/nodes/pg_list.h.diff?r1=1.49&r2=1.50)

Browse pgsql-committers by date

  From Date Subject
Next Message Neil Conway 2004-09-27 04:18:28 pgsql-server: Remove references to the ODBC driver from the main source
Previous Message Neil Conway 2004-09-27 04:01:23 pgsql-server: Code cleanup: don't bother casting the argument to pfree()