Changeset: e046d344039a for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e046d344039a
Modified Files:
        sql/storage/bat/bat_table.c
Branch: Mar2018
Log Message:

Streamline code.


diffs (25 lines):

diff --git a/sql/storage/bat/bat_table.c b/sql/storage/bat/bat_table.c
--- a/sql/storage/bat/bat_table.c
+++ b/sql/storage/bat/bat_table.c
@@ -215,15 +215,14 @@ column_find_value(sql_trans *tr, sql_col
        }
        if (q != BUN_NONE) {
                BATiter bi = bat_iterator(b);
-               void *r;
+               const void *r;
                size_t sz;
 
-               res = BUNtail(bi, q);
-               sz = ATOMlen(b->ttype, res);
-               r = GDKmalloc(sz);
-               if(r)
-                       memcpy(r,res,sz);
-               res = r;
+               r = BUNtail(bi, q);
+               sz = ATOMlen(b->ttype, r);
+               res = GDKmalloc(sz);
+               if (res)
+                       memcpy(res, r, sz);
        }
        full_destroy(c, b);
        return res;
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to