Changeset: 5632e7ee3a2b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/5632e7ee3a2b
Modified Files:
        monetdb5/modules/mal/mkey.c
        sql/backends/monet5/sql_rank.c
Branch: default
Log Message:

Cleaning pointers


diffs (69 lines):

diff --git a/monetdb5/modules/mal/mkey.c b/monetdb5/modules/mal/mkey.c
--- a/monetdb5/modules/mal/mkey.c
+++ b/monetdb5/modules/mal/mkey.c
@@ -139,13 +139,11 @@ MKEYrotate(lng *res, const lng *val, con
 static str
 MKEYhash(Client cntxt, MalBlkPtr mb, MalStkPtr stk, InstrPtr p)
 {
-       lng *res;
-       ptr val;
+       lng *res = getArgReference_lng(stk,p,0);
+       ptr val = getArgReference(stk,p,1);
        int tpe = getArgType(mb,p,1);
 
        (void) cntxt;
-       res= getArgReference_lng(stk,p,0);
-       val= getArgReference(stk,p,1);
        switch (ATOMstorage(tpe)) {
        case TYPE_void:
                *res = lng_nil; /* It can be called from SQL */
@@ -288,7 +286,7 @@ MKEYrotate_xor_hash(Client cntxt, MalBlk
        int lbit = *getArgReference_int(stk, p, 2);
        int rbit = (int) sizeof(lng) * 8 - lbit;
        int tpe = getArgType(mb, p, 3);
-       ptr *pval = getArgReference(stk, p, 3);
+       ptr pval = getArgReference(stk, p, 3);
        ulng val;
 
        (void) cntxt;
@@ -443,7 +441,7 @@ MKEYbulkconst_rotate_xor_hash(Client cnt
        bat *hid = getArgReference_bat(stk, p, 1);
        int lbit = *getArgReference_int(stk, p, 2);
        int tpe = getArgType(mb, p, 3);
-       ptr *pval = getArgReference(stk, p, 3);
+       ptr pval = getArgReference(stk, p, 3);
        BAT *hb, *bn;
        int rbit = (int) sizeof(lng) * 8 - lbit;
        ulng *r;
@@ -497,8 +495,8 @@ MKEYbulkconst_rotate_xor_hash(Client cnt
        h = (const ulng *) Tloc(hb, 0);
 
        while (n-- > 0) {
-                       *r++ = GDK_ROTATE(*h, lbit, rbit) ^ val;
-                       h++;
+               *r++ = GDK_ROTATE(*h, lbit, rbit) ^ val;
+               h++;
        }
 
        if (bn->batCount <= 1) {
diff --git a/sql/backends/monet5/sql_rank.c b/sql/backends/monet5/sql_rank.c
--- a/sql/backends/monet5/sql_rank.c
+++ b/sql/backends/monet5/sql_rank.c
@@ -139,7 +139,7 @@ SQLwindow_bound(Client cntxt, MalBlkPtr 
        (void)cntxt;
        if (isaBatType(getArgType(mb, pci, 1))) {
                int tp1, tp2 = getArgType(mb, pci, part_offset + 5);
-               void *limit = NULL;
+               ptr limit = NULL;
                bool is_a_bat;
 
                res = getArgReference_bat(stk, pci, 0);
@@ -734,7 +734,7 @@ SQLntile(Client cntxt, MalBlkPtr mb, Mal
 
        if (isaBatType(getArgType(mb, pci, 1))) {
                int tp2 = 0;
-               void *ntile = NULL;
+               ptr ntile = NULL;
                res = getArgReference_bat(stk, pci, 0);
 
                if (!(b = BATdescriptor(*getArgReference_bat(stk, pci, 1)))) {
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to