Changeset: 3f4810856a93 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=3f4810856a93
Modified Files:
        monetdb5/mal/mal_listing.c
        monetdb5/mal/mal_readline.c
Branch: Feb2013
Log Message:

Reduce assertions
Avoid stopping the server when you reach a non-critical buffer limit.
Drop assertion when the context has already tested the validity.


diffs (35 lines):

diff --git a/monetdb5/mal/mal_listing.c b/monetdb5/mal/mal_listing.c
--- a/monetdb5/mal/mal_listing.c
+++ b/monetdb5/mal/mal_listing.c
@@ -18,10 +18,7 @@
 */
 
 /*
- * @a M. Kersten
- * @v 1.0
- * TODO, this code base should be protected against overflow using
- * a temporary file store
+ * M. Kersten
 */
 
 #include "monetdb_config.h"
@@ -46,7 +43,7 @@
  * 
  * The protection against overflow is not tight.
 */
-#define advance(X,B,L)  assert(X< B+L); while(*(X) && B+L>X)(X)++;
+#define advance(X,B,L)  while(*(X) && B+L>X)(X)++;
 
 str
 instructionCall(MalBlkPtr mb, InstrPtr p, str s, str base, size_t len)
diff --git a/monetdb5/mal/mal_readline.c b/monetdb5/mal/mal_readline.c
--- a/monetdb5/mal/mal_readline.c
+++ b/monetdb5/mal/mal_readline.c
@@ -457,7 +457,6 @@ readConsole(Client cntxt)
        struct stat statb;
        char *buf;
 
-       assert(cntxt == mal_clients);
        if (cntxt->promptlength == 0 ||
           !(fstat(fileno(stdin), &statb) == 0 && S_ISCHR(statb.st_mode))  )
                return -1;
_______________________________________________
checkin-list mailing list
[email protected]
http://mail.monetdb.org/mailman/listinfo/checkin-list

Reply via email to