Changeset: e5cc2d73e570 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=e5cc2d73e570
Modified Files:
        monetdb5/modules/mal/rapi.c
Branch: RIntegration
Log Message:

RAPIeval(): listening to compilers and fixing code logic

compiler (with optimization enabled) complained about
uninitialized use of a variable;
carefull look at the code revealed that the variable
was not only not initialized, but the way it was used
was logically wrong


diffs (21 lines):

diff --git a/monetdb5/modules/mal/rapi.c b/monetdb5/modules/mal/rapi.c
--- a/monetdb5/modules/mal/rapi.c
+++ b/monetdb5/modules/mal/rapi.c
@@ -256,7 +256,7 @@ str RAPIeval(Client cntxt, MalBlkPtr mb,
                                                *p= int_nil;
                                        } 
                                        // also update the sortedness properties
-                                       if (prev){
+                                       if (i > 0){
                                                if ( *p > prev && 
b->trevsorted){
                                                        b->trevsorted = 0;
                                                        if (*p != prev +1)
@@ -297,7 +297,7 @@ str RAPIeval(Client cntxt, MalBlkPtr mb,
                                                *p= int_nil;
                                        }
                                        // also update the sortedness properties
-                                       if (prev){
+                                       if (i > 0){
                                                if ( *p > prev && 
b->trevsorted){
                                                        b->trevsorted = 0;
                                                        if (*p != prev +1)
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to