Changeset: 62b7ec44ed01 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=62b7ec44ed01
Modified Files:
        common/utils/mstring.h
        monetdb5/mal/mal_instruction.c
        sql/common/sql_list.c
Branch: sq2default
Log Message:

cleanup
reordered destruction of data /list removal


diffs (44 lines):

diff --git a/common/utils/mstring.h b/common/utils/mstring.h
--- a/common/utils/mstring.h
+++ b/common/utils/mstring.h
@@ -20,6 +20,7 @@ strcpy_len(char *restrict dst, const cha
                                return i;
                }
                dst[n - 1] = 0;
+               return n-1;
        }
        return strlen(src);
 }
diff --git a/monetdb5/mal/mal_instruction.c b/monetdb5/mal/mal_instruction.c
--- a/monetdb5/mal/mal_instruction.c
+++ b/monetdb5/mal/mal_instruction.c
@@ -791,9 +791,9 @@ newVariable(MalBlkPtr mb, const char *na
                /* no space for a new variable */
                return -1;
        n = mb->vtop;
-       if( name == 0 || len == 0)
+       if( name == 0 || len == 0){
                (void) snprintf(getVarName(mb,n), IDLENGTH,"%c%c%d", REFMARKER, 
TMPMARKER,mb->vid++);
-       else{
+       } else {
                (void) strcpy_len( getVarName(mb,n), name, len + 1);
        }
 
diff --git a/sql/common/sql_list.c b/sql/common/sql_list.c
--- a/sql/common/sql_list.c
+++ b/sql/common/sql_list.c
@@ -312,12 +312,12 @@ list_remove_node(list *l, node *n)
        }
        if (n == l->t)
                l->t = p;
-       node_destroy(l, n);
-       l->cnt--;
        MT_lock_set(&l->ht_lock);
        if (l->ht && data)
                hash_delete(l->ht, data);
        MT_lock_unset(&l->ht_lock);
+       node_destroy(l, n);
+       l->cnt--;
        return p;
 }
 
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to