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

Modified Files:
      Tag: M5XQ
        serialize.mx 
Log Message:
propagated changes of Sunday Feb 21 2010
from the XQFT branch to the M5XQ branch

  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  2010/02/21 - stmane: runtime/serialize.mx,1.122.12.3
  propagated changes of Sunday Feb 21 2010
  from the development trunk to the XQFT branch
  
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    2010/02/21 - stmane: runtime/serialize.mx,1.125
    propagated changes of Thursday Feb 18 2010 - Sunday Feb 21 2010
    from the Feb2010 branch to the development trunk
  
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      2010/02/18 - sjoerd: runtime/serialize.mx,1.124.2.1
      If there is code to set uri and prefix to NULL, you have to deal with
      the possibility they are, in fact, NULL.
      Found by Coverity.
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Index: serialize.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/runtime/serialize.mx,v
retrieving revision 1.122.2.2
retrieving revision 1.122.2.3
diff -u -d -r1.122.2.2 -r1.122.2.3
--- serialize.mx        8 Jan 2010 09:11:14 -0000       1.122.2.2
+++ serialize.mx        21 Feb 2010 21:45:29 -0000      1.122.2.3
@@ -492,7 +492,7 @@
 
     if ( fp ) {
 #ifdef DEBUGNS
-        stream_printf (GDKerr, "+NS:xmlNsPush(\"%s\",\"%s\")\n", prefix, uri);
+        stream_printf (GDKerr, "+NS:xmlNsPush(\"%s\",\"%s\")\n", prefix ? 
prefix : "", uri ? uri : "");
 #endif
         fp->prefix = NULL;
         fp->uri    = NULL;
@@ -687,7 +687,7 @@
     /* check in current node context if a namespace
        with this prefix is declared */
     while (fp) {
-        if (!strcmp (prefix, fp->prefix))
+        if (prefix && !strcmp (prefix, fp->prefix))
             break;
             
         fp = fp->prev;
@@ -708,7 +708,7 @@
     /* check in current node context if a namespace
        with this prefix is declared */
     while (fp) {
-        if (!strcmp (prefix, fp->prefix))
+        if (prefix && !strcmp (prefix, fp->prefix))
             break;
             
         if (fp == limit)
@@ -726,9 +726,10 @@
         return ctx->driverFun->@2 (ctx, prefix, loc, val);
     }
 
+    assert (prefix != NULL);
 
     /* uri and prefix match -> no namespace attribute needed */
-    if (!strcmp (uri, fp->uri))
+    if (uri && !strcmp (uri, fp->uri))
         return ctx->driverFun->@2 (ctx, prefix, loc, val);
 
 
@@ -738,7 +739,7 @@
     if (currentPrefix && 
         (currentUri = xmlNsUriFind (&ctx->nsTop, currentPrefix)) &&
         /* check if prefix has been redeclared */
-        !strcmp (currentUri, uri))
+        uri && !strcmp (currentUri, uri))
         return ctx->driverFun->@2 (ctx, currentPrefix, loc, val);
 
 


------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to