Update of /cvsroot/monetdb/sql/src/common
In directory 23jxhf1.ch3.sourceforge.com:/tmp/cvs-serv22224/src/common

Modified Files:
        sql_list.mx 
Log Message:
propagated changes of Wednesday Nov 11 2009 - Thursday Nov 12 2009
from the Nov2009 branch to the development trunk

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/11/11 - nielsnes: src/common/sql_list.mx,1.21.2.1
  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.22
diff -u -d -r1.21 -r1.22
--- sql_list.mx 14 Sep 2009 18:20:28 -0000      1.21
+++ sql_list.mx 12 Nov 2009 08:39:29 -0000      1.22
@@ -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

Reply via email to