Update of /cvsroot/monetdb/pathfinder/compiler/mil
In directory sc8-pr-cvs16:/tmp/cvs-serv18640
Modified Files:
milprint_summer.c
Log Message:
Fix bug introduced by replacing call to alloca.
Index: milprint_summer.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/mil/milprint_summer.c,v
retrieving revision 1.371
retrieving revision 1.372
diff -u -d -r1.371 -r1.372
--- milprint_summer.c 2 May 2007 21:15:18 -0000 1.371
+++ milprint_summer.c 2 May 2007 21:39:30 -0000 1.372
@@ -11142,17 +11142,17 @@
/* initialize function variables */
/* ============================= */
size_t maxbufsize = 0;
- char *buf = NULL;
+ char *nme = NULL;
while (args->kind != c_nil)
{
/* get the type name, and assure there *is* a namespace */
char *tpe = PFty_str(TY(LR(args)));
- char *nme;
+ char *buf;
if (maxbufsize < strlen(tpe) + 4) {
maxbufsize = strlen(tpe) + 4;
- buf = buf ? realloc(buf, maxbufsize) : malloc(maxbufsize);
+ nme = nme ? realloc(nme, maxbufsize) : malloc(maxbufsize);
}
- nme = buf;
+ buf = nme;
if (strchr(tpe, ':') == NULL) {
*nme++ = 'x';
*nme++ = 's';
@@ -11178,8 +11178,8 @@
args = R(args);
}
- if (buf)
- free(buf);
+ if (nme)
+ free(nme);
/* create the full signature that also is a valid MIL identifier */
c->sem.fun->sig = PFmalloc(12+3*(strlen(sig)+strlen(p)));
-------------------------------------------------------------------------
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