Update of /cvsroot/monetdb/pathfinder/compiler/sql
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv20437/compiler/sql
Modified Files:
sql.c
Log Message:
propagated changes of Thursday Feb 21 2008 - Friday Feb 22 2008
from the XQuery_0-22 branch to the development trunk
Index: sql.c
===================================================================
RCS file: /cvsroot/monetdb/pathfinder/compiler/sql/sql.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- sql.c 20 Feb 2008 12:26:57 -0000 1.53
+++ sql.c 22 Feb 2008 12:46:34 -0000 1.54
@@ -1265,7 +1265,7 @@
default:
{
size_t len = sizeof ("t0000");
- char *res = (char *) PFmalloc (len);
+ char *res = (char *) PFmalloc (len+1);
/* to express table names we use
* the following format:
* t[0-9][0-9][0-9][0-9]
@@ -1296,7 +1296,7 @@
default:
{
size_t len = sizeof ("a0000");
- char *res = (char *) PFmalloc (len);
+ char *res = (char *) PFmalloc (len+1);
/* to express alias names we use
* the following format:
* a[0-9][0-9][0-9][0-9]
@@ -1349,7 +1349,7 @@
case sql_col_max: return "max";
case sql_col_dist:
assert (name->ty < 100);
- res = (char *) PFmalloc (7 * sizeof (char));
+ res = (char *) PFmalloc (8);
snprintf (res, 7, "dist%02u", name->ty);
return res;
}
@@ -1358,7 +1358,7 @@
char *tystr = PFalg_simple_type_str (name->ty);
size_t len = strlen (attstr) + strlen (tystr) + 2;
- res = (char *) PFmalloc (len * sizeof (char));
+ res = (char *) PFmalloc (len + 1);
snprintf (res, len, "%s_%s", attstr, tystr);
}
return res;
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-pf-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-pf-checkins