Changeset: e1dcaf6f82b4 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e1dcaf6f82b4 Modified Files: sql/backends/monet5/sql_scenario.c Branch: Jan2014 Log Message:
Add cast, and we don't need to round up to multiples of a BLOCK. diffs (12 lines): diff --git a/sql/backends/monet5/sql_scenario.c b/sql/backends/monet5/sql_scenario.c --- a/sql/backends/monet5/sql_scenario.c +++ b/sql/backends/monet5/sql_scenario.c @@ -1097,7 +1097,7 @@ SQLinitClient(Client c) struct stat st; if (fstat(fileno(getFile(fd)), &st) < 0) st.st_size = 128 * BLOCK; - bfd = bstream_create(fd, BLOCK * (st.st_size / BLOCK + 1)); + bfd = bstream_create(fd, (size_t) st.st_size); if (bfd && bstream_next(bfd) >= 0) msg = SQLstatementIntern(c, &bfd->buf, "sql.init", TRUE, FALSE); bstream_destroy(bfd); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list