Update of /cvsroot/monetdb/pathfinder/modules/pftijah
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv7248

Modified Files:
        nexi.c nexi_generate_mil.c nexi_generate_plan.c pftijah.mx 
        serialize_pftijah.mx termdb.mx 
Log Message:

documented / marked newly added assert()'s:
/* FIXME: properly handle failing alloc() */


Index: serialize_pftijah.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/serialize_pftijah.mx,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- serialize_pftijah.mx        24 May 2007 13:10:24 -0000      1.46
+++ serialize_pftijah.mx        24 May 2007 19:43:39 -0000      1.47
@@ -953,14 +953,14 @@
         } else {
             //if (*res) GDKfree(*res);
             *res = GDKmalloc( strlen(stemmed)+1 );
-            assert(*res);
+            assert(*res); /* FIXME: properly handle failing alloc() */
             strcpy( *res, stemmed );
         }
         //if ( stemCtx->clear ) stemCtx->clear( stemCtx );
     } else {
         //if (*res) GDKfree(*res);
         *res = GDKmalloc( strlen(term)+1 );
-        assert(*res);
+        assert(*res); /* FIXME: properly handle failing alloc() */
         strcpy( *res, term );
     }
     return GDK_SUCCEED;

Index: nexi.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/nexi.c,v
retrieving revision 1.59
retrieving revision 1.60
diff -u -d -r1.59 -r1.60
--- nexi.c      24 May 2007 13:10:23 -0000      1.59
+++ nexi.c      24 May 2007 19:43:38 -0000      1.60
@@ -198,11 +198,11 @@
        This bug should be fixed now, with the cleanup of nexi_rewriter.c
     */
     txt_retr_model = calloc(MAX_QUERIES, sizeof(struct_RMT));
-    assert(txt_retr_model);
+    assert(txt_retr_model); /* FIXME: properly handle failing alloc() */
     img_retr_model = calloc(MAX_QUERIES, sizeof(struct_RMI));
-    assert(img_retr_model);
+    assert(img_retr_model); /* FIXME: properly handle failing alloc() */
     rel_feedback = calloc(MAX_QUERIES, sizeof(struct_RF));
-    assert(rel_feedback);
+    assert(rel_feedback); /* FIXME: properly handle failing alloc() */
 
     /*** Set default configuration values here: ***/
     
@@ -673,7 +673,7 @@
        tsl->cnt   = 0;
        tsl->max   = max;
        tsl->val   = GDKmalloc( tsl->max * sizeof(char*) );
-       assert(tsl->val);
+       assert(tsl->val); /* FIXME: properly handle failing alloc() */
        return 1;
 }
 
@@ -703,7 +703,7 @@
        if ( tsl->cnt >= tsl->max) {
                tsl->max *= 2;
                tsl->val = GDKrealloc(tsl->val,(tsl->max * sizeof(char*)));
-               assert(tsl->val);
+               assert(tsl->val); /* FIXME: properly handle failing alloc() */
        }
 #ifdef DEBUG_LIST
        stream_printf(GDKout,"# appending \"%s\" to LIST[%s].\n",v,tsl->label);
@@ -726,7 +726,7 @@
        tnl->cnt   = 0;
        tnl->max   = max;
        tnl->val   = GDKmalloc( tnl->max * sizeof(int) );
-       assert(tnl->val);
+       assert(tnl->val); /* FIXME: properly handle failing alloc() */
        return 1;
 }
 
@@ -750,7 +750,7 @@
        if ( tnl->cnt >= tnl->max) {
                tnl->max *= 2;
                tnl->val = GDKrealloc(tnl->val,tnl->max * sizeof(int));
-               assert(tnl->val);
+               assert(tnl->val); /* FIXME: properly handle failing alloc() */
        }
 #ifdef DEBUG_LIST
        stream_printf(GDKout,"# appending (%d) to LIST[%s].\n",v,tnl->label);

Index: termdb.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/termdb.mx,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- termdb.mx   24 May 2007 13:10:24 -0000      1.8
+++ termdb.mx   24 May 2007 19:43:39 -0000      1.9
@@ -514,11 +514,11 @@
      *
      */
     tdb->hashbat= GDKrealloc(tdb->hashbat,1+(int)tdb->curFrag* sizeof(BAT*));
-    assert(tdb->hashbat);
+    assert(tdb->hashbat); /* FIXME: properly handle failing alloc() */
     tdb->hashbat[new_fragIdx] = 0;
     if (tdb->hashbatSize) {
         tdb->hashbatSize = GDKrealloc(tdb->hashbatSize,1+(int)tdb->curFrag* 
sizeof(size_t));
-        assert(tdb->hashbatSize);
+        assert(tdb->hashbatSize); /* FIXME: properly handle failing alloc() */
         tdb->hashbatSize[frag]        = 0;
         tdb->hashbatSize[new_fragIdx] = 0;
     }

Index: nexi_generate_plan.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/nexi_generate_plan.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- nexi_generate_plan.c        24 May 2007 13:10:24 -0000      1.6
+++ nexi_generate_plan.c        24 May 2007 19:43:39 -0000      1.7
@@ -178,10 +178,10 @@
 
   /* initialization for query plan trees */
   p_command_array = calloc(MAX_QUERIES, sizeof(command_tree*));
-  assert(p_command_array);
+  assert(p_command_array); /* FIXME: properly handle failing alloc() */
   p_command_start = p_command_array;
   p_command = calloc(MAX_QUERIES*OPERAND_MAX, sizeof(command_tree));
-  assert(p_command);
+  assert(p_command); /* FIXME: properly handle failing alloc() */
 
   /* printf("%d\n",p_command_array); */
   /* printf("%d\n",p_command); */

Index: nexi_generate_mil.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/nexi_generate_mil.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -d -r1.29 -r1.30
--- nexi_generate_mil.c 24 May 2007 13:10:23 -0000      1.29
+++ nexi_generate_mil.c 24 May 2007 19:43:39 -0000      1.30
@@ -207,11 +207,11 @@
 
   /* memory allocation for string manipulation */
   argument1 = calloc(TERM_LENGTH, sizeof(char));
-  assert(argument1);
+  assert(argument1); /* FIXME: properly handle failing alloc() */
   term_cut = calloc(TERM_LENGTH, sizeof(char));
-  assert(term_cut);
+  assert(term_cut); /* FIXME: properly handle failing alloc() */
   unq_term = calloc(ADJ_TERM_MAX * TERM_LENGTH, sizeof(char));
-  assert(unq_term);
+  assert(unq_term); /* FIXME: properly handle failing alloc() */
 
   /* formating the mil header */
 

Index: pftijah.mx
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/modules/pftijah/pftijah.mx,v
retrieving revision 1.121
retrieving revision 1.122
diff -u -d -r1.121 -r1.122
--- pftijah.mx  24 May 2007 13:10:24 -0000      1.121
+++ pftijah.mx  24 May 2007 19:43:39 -0000      1.122
@@ -3183,7 +3183,7 @@
 {
        int sz    = strlen(arg);
        char* buf = GDKmalloc(sz + 1);
-       assert(buf);
+       assert(buf); /* FIXME: properly handle failing alloc() */
 
        buf[0] = 0;
        *res = tijah_tokenize_string(arg,sz,buf);
@@ -3196,7 +3196,7 @@
 
        int nDocs = BATcount(doc_loaded);
        BAT **rangeBAT = (BAT**)GDKmalloc(nDocs*sizeof(BAT*));
-       assert(rangeBAT);
+       assert(rangeBAT); /* FIXME: properly handle failing alloc() */
        for(int i=0; i<nDocs; i++) {
            rangeBAT[i] = NULL;
         }
@@ -3652,11 +3652,11 @@
        BAT** bats = (BAT**) GDKmalloc(term_cnt * sizeof(BAT*)); 
         BUN* dsts = (BUN*) GDKmalloc(term_cnt * sizeof(BUN));
        int* bfrees = (int*) GDKmalloc(term_cnt * sizeof(int));
-       assert(terms);
-       assert(facs);
-       assert(bats);
-       assert(dsts);
-       assert(bfrees);
+       assert(terms); /* FIXME: properly handle failing alloc() */
+       assert(facs); /* FIXME: properly handle failing alloc() */
+       assert(bats); /* FIXME: properly handle failing alloc() */
+       assert(dsts); /* FIXME: properly handle failing alloc() */
+       assert(bfrees); /* FIXME: properly handle failing alloc() */
        
        /* --------------------------- checks 
---------------------------------- */
        


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins

Reply via email to