Update of /cvsroot/monetdb/pathfinder/runtime
In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv32644

Modified Files:
      Tag: Nov2009
        vx_index.mx 
Log Message:
Postpone dereference until after NULL check.


Index: vx_index.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/vx_index.mx,v
retrieving revision 1.12
retrieving revision 1.12.8.1
diff -u -d -r1.12 -r1.12.8.1
--- vx_index.mx 13 Apr 2009 23:40:10 -0000      1.12
+++ vx_index.mx 7 Dec 2009 11:42:01 -0000       1.12.8.1
@@ -128,11 +128,16 @@
     if (ALIGNsynced(l, r)) {
         size_t i = 0, cnt = BATcount(l);
         BAT *bn = *res = BATnew(TYPE_void, TYPE_int, cnt);
-        int *lval = (int*) Tloc(bn, BUNfirst(l));
-        int *rval = (int*) Tloc(bn, BUNfirst(r));
-        int *dst  = (int*) Tloc(bn, BUNfirst(bn));
+        int *lval;
+        int *rval;
+        int *dst;
+
         if (bn == NULL) return GDK_FAIL;
 
+        lval = (int*) Tloc(bn, BUNfirst(l));
+        rval = (int*) Tloc(bn, BUNfirst(r));
+        dst  = (int*) Tloc(bn, BUNfirst(bn));
+
         for(i=0; i<cnt; i++)
             dst[i] = XQH_C(lval[i], rval[i]);
 


------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing. 
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to