Changeset: b18666c30835 for MonetDB
URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=b18666c30835
Modified Files:
        monetdb5/modules/atoms/str.c
Branch: Jun2016
Log Message:

Function returns int, not size_t.


diffs (32 lines):

diff --git a/monetdb5/modules/atoms/str.c b/monetdb5/modules/atoms/str.c
--- a/monetdb5/modules/atoms/str.c
+++ b/monetdb5/modules/atoms/str.c
@@ -1588,7 +1588,7 @@ STRConcat(str *res, const str *val1, con
 str
 STRLength(int *res, const str *arg1)
 {
-       size_t l;
+       int l;
        const char *s = *arg1;
 
        if (strNil(s)) {
@@ -1597,7 +1597,7 @@ STRLength(int *res, const str *arg1)
        }
        l =  UTF8_strlen(s);
        assert(l <INT_MAX);
-       *res = (int) l;
+       *res = l;
        return MAL_SUCCEED;
 }
 
@@ -1622,9 +1622,7 @@ STRTail(str *res, const str *arg1, const
                *res = GDKstrdup(str_nil);
        } else {
                if (off < 0) {
-                       size_t l = UTF8_strlen(s);
-                       int len = (int) l;
-                       assert(l < INT_MAX);
+                       int len = UTF8_strlen(s);
 
                        if (len == int_nil) {
                                *res = GDKstrdup(str_nil);
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to