Update of /cvsroot/monetdb/sql/src/common
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv21191/src/common
Modified Files:
Tag: Nov2009
sql_list.mx
Log Message:
fixed bug in new rel_case_fixup (properly use left and right parts
of div not only left).
made list_select more defensive.
Index: sql_list.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/common/sql_list.mx,v
retrieving revision 1.21
retrieving revision 1.21.2.1
diff -u -d -r1.21 -r1.21.2.1
--- sql_list.mx 14 Sep 2009 18:20:28 -0000 1.21
+++ sql_list.mx 11 Nov 2009 18:20:24 -0000 1.21.2.1
@@ -279,15 +279,14 @@
list *
list_select(list *l, void *key, fcmp cmp, fdup dup)
{
- list *res = list_create(l->destroy);
+ list *res = NULL;
node *n = NULL;
- if (key) {
- for (n = l->h; n; n = n->next) {
- if (cmp(n->data, key) == 0) {
+ if (key && l) {
+ res = list_create(l->destroy);
+ for (n = l->h; n; n = n->next)
+ if (cmp(n->data, key) == 0)
list_append(res, dup(n->data));
- }
- }
}
return res;
}
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins