Update of /cvsroot/monetdb/sql/src/common
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv8924/src/common

Modified Files:
        sql_list.mx 
Log Message:
propagated changes of Wednesday Dec 23 2009 - Saturday Dec 26 2009
from the Nov2009 branch to the development trunk

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2009/12/23 - sjoerd: src/common/sql_list.mx,1.21.2.3
  The lists don't change size half way through the function.
  Found by Coverity.
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: sql_list.mx
===================================================================
RCS file: /cvsroot/monetdb/sql/src/common/sql_list.mx,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- sql_list.mx 28 Nov 2009 19:56:35 -0000      1.23
+++ sql_list.mx 26 Dec 2009 10:56:32 -0000      1.24
@@ -269,8 +269,8 @@
        /* sort descending */
        GDKqsort_rev(keys, pos, NULL, cnt, sizeof(int), sizeof(int), TYPE_int);
        for(j=0; j<cnt; j++) {
-               for(n = l->h, i = 0; n && i != pos[j]; n = n->next, i++) 
-                       ;
+               for(n = l->h, i = 0; i != pos[j]; n = n->next, i++) 
+                       assert(n);
                list_append(res, dup(n->data));
        }
        return res;
@@ -292,8 +292,8 @@
        /* sort descending */
        GDKqsort_rev(keys, pos, NULL, cnt, sizeof(int), sizeof(int), TYPE_int);
        for(j=0; j<cnt; j++) {
-               for(n = l->h, i = 0; n && i != pos[j]; n = n->next, i++) 
-                       ;
+               for(n = l->h, i = 0; i != pos[j]; n = n->next, i++) 
+                       assert(n);
                list_append(res, dup(n->data));
        }
        return res;


------------------------------------------------------------------------------
This SF.Net email is sponsored by the Verizon Developer Community
Take advantage of Verizon's best-in-class app development support
A streamlined, 14 day to market process makes app distribution fast and easy
Join now and get one step closer to millions of Verizon customers
http://p.sf.net/sfu/verizon-dev2dev 
_______________________________________________
Monetdb-sql-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-sql-checkins

Reply via email to