summaryrefslogtreecommitdiff
path: root/src/include/nodes
diff options
context:
space:
mode:
authorNeil Conway2004-09-27 04:12:03 +0000
committerNeil Conway2004-09-27 04:12:03 +0000
commit64a60590ba5da8026abb65a7abe8fce9e573c476 (patch)
treefbb640591745e267977b99289e25e6ef4694fb08 /src/include/nodes
parent0ed07d49d5b5aed54da02b9dfa87856ba09af859 (diff)
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()
Diffstat (limited to 'src/include/nodes')
-rw-r--r--src/include/nodes/pg_list.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/include/nodes/pg_list.h b/src/include/nodes/pg_list.h
index c35e7c64ba1..d8957b35223 100644
--- a/src/include/nodes/pg_list.h
+++ b/src/include/nodes/pg_list.h
@@ -30,7 +30,7 @@
* Portions Copyright (c) 1996-2004, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $PostgreSQL: pgsql/src/include/nodes/pg_list.h,v 1.49 2004/08/29 05:06:57 momjian Exp $
+ * $PostgreSQL: pgsql/src/include/nodes/pg_list.h,v 1.50 2004/09/27 04:12:03 neilc Exp $
*
*-------------------------------------------------------------------------
*/
@@ -167,8 +167,8 @@ extern int list_length(List *l);
* a convenience macro which loops through a list starting from a
* specified cell
*/
-#define for_each_cell(cell, l) \
- for ((cell) = (l); (cell) != NULL; (cell) = lnext(cell))
+#define for_each_cell(cell, initcell) \
+ for ((cell) = (initcell); (cell) != NULL; (cell) = lnext(cell))
/*
* forboth -