Changeset: afb5e65b596f for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/afb5e65b596f
Modified Files:
monetdb5/mal/mal_builder.c
sql/storage/objlist.c
Branch: Jun2023
Log Message:
Remove assert and check for NULL.
diffs (23 lines):
diff --git a/monetdb5/mal/mal_builder.c b/monetdb5/mal/mal_builder.c
--- a/monetdb5/mal/mal_builder.c
+++ b/monetdb5/mal/mal_builder.c
@@ -251,7 +251,6 @@ getIntConstant(MalBlkPtr mb, int val)
_t= fndConstant(mb, &cst, MAL_VAR_WINDOW);
if( _t < 0)
_t = defConstant(mb, TYPE_int, &cst);
- assert(_t >= 0);
return _t;
}
diff --git a/sql/storage/objlist.c b/sql/storage/objlist.c
--- a/sql/storage/objlist.c
+++ b/sql/storage/objlist.c
@@ -58,6 +58,8 @@ ol_add(objlist *ol, sql_base *data)
if (ol->h->size <= sz) {
hash_destroy(ol->h);
ol->h = hash_new(ol->l->sa, 4*sz, (fkeyvalue)&node_key);
+ if (ol->h == NULL)
+ return -1;
for (node *n = ol->l->h; n; n = n->next) {
if (hash_add(ol->h, base_key(n->data), n) == NULL)
/* No need to clean, ie expect a full
transaction rollback */
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]