diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2012-04-14 13:13:18 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2012-04-14 13:13:18 +0000 |
commit | 7f0ff55c1e37fab526b9871d068724a989f58ca8 (patch) | |
tree | 499187446dcbcc485f24deaf498071ba697c83a1 /lib | |
parent | f0b28b34f06d848146b38953d7c951a6c2736485 (diff) |
sqlite 3.7.11 library, vendor sources
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libsqlite3/src/test_fuzzer.c | 19 | ||||
-rw-r--r-- | lib/libsqlite3/src/test_wholenumber.c | 4 |
2 files changed, 12 insertions, 11 deletions
diff --git a/lib/libsqlite3/src/test_fuzzer.c b/lib/libsqlite3/src/test_fuzzer.c index 10496f2ea74..60d56ee1ea8 100644 --- a/lib/libsqlite3/src/test_fuzzer.c +++ b/lib/libsqlite3/src/test_fuzzer.c @@ -308,8 +308,8 @@ static int fuzzerLoadOneRule( if( zFrom==0 ) zFrom = ""; if( zTo==0 ) zTo = ""; - nFrom = (int)strlen(zFrom); - nTo = (int)strlen(zTo); + nFrom = strlen(zFrom); + nTo = strlen(zTo); /* Silently ignore null transformations */ if( strcmp(zFrom, zTo)==0 ){ @@ -448,7 +448,7 @@ static char *fuzzerDequote(const char *zIn){ int nIn; /* Size of input string, in bytes */ char *zOut; /* Output (dequoted) string */ - nIn = (int)strlen(zIn); + nIn = strlen(zIn); zOut = sqlite3_malloc(nIn+1); if( zOut ){ char q = zIn[0]; /* Quote character (if any ) */ @@ -465,7 +465,7 @@ static char *fuzzerDequote(const char *zIn){ zOut[iOut++] = zIn[iIn]; } } - assert( (int)strlen(zOut)<=nIn ); + assert( strlen(zOut)<=nIn ); } return zOut; } @@ -513,7 +513,7 @@ static int fuzzerConnect( }else{ int nModule; /* Length of zModule, in bytes */ - nModule = (int)strlen(zModule); + nModule = strlen(zModule); pNew = sqlite3_malloc( sizeof(*pNew) + nModule + 1); if( pNew==0 ){ rc = SQLITE_NOMEM; @@ -870,11 +870,11 @@ static fuzzer_stem *fuzzerNewStem( fuzzer_rule *pRule; unsigned int h; - pNew = sqlite3_malloc( sizeof(*pNew) + (int)strlen(zWord) + 1 ); + pNew = sqlite3_malloc( sizeof(*pNew) + strlen(zWord) + 1 ); if( pNew==0 ) return 0; memset(pNew, 0, sizeof(*pNew)); pNew->zBasis = (char*)&pNew[1]; - pNew->nBasis = (int)strlen(zWord); + pNew->nBasis = strlen(zWord); memcpy(pNew->zBasis, zWord, pNew->nBasis+1); pRule = pCur->pVtab->pRule; while( fuzzerSkipRule(pRule, pNew, pCur->iRuleset) ){ @@ -997,7 +997,7 @@ static int fuzzerFilter( /* If the query term is longer than FUZZER_MX_OUTPUT_LENGTH bytes, this ** query will return zero rows. */ - if( (int)strlen(zWord)<FUZZER_MX_OUTPUT_LENGTH ){ + if( strlen(zWord)<FUZZER_MX_OUTPUT_LENGTH ){ pCur->pStem = pStem = fuzzerNewStem(pCur, zWord, (fuzzer_cost)0); if( pStem==0 ) return SQLITE_NOMEM; pStem->pRule = &pCur->nullRule; @@ -1127,7 +1127,8 @@ static int fuzzerBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){ } /* -** A virtual table module that implements the "fuzzer". +** A virtual table module that provides read-only access to a +** Tcl global variable namespace. */ static sqlite3_module fuzzerModule = { 0, /* iVersion */ diff --git a/lib/libsqlite3/src/test_wholenumber.c b/lib/libsqlite3/src/test_wholenumber.c index 7c42d01691b..150dc95ac49 100644 --- a/lib/libsqlite3/src/test_wholenumber.c +++ b/lib/libsqlite3/src/test_wholenumber.c @@ -33,8 +33,8 @@ typedef struct wholenumber_cursor wholenumber_cursor; struct wholenumber_cursor { sqlite3_vtab_cursor base; /* Base class - must be first */ - sqlite3_int64 iValue; /* Current value */ - sqlite3_int64 mxValue; /* Maximum value */ + unsigned iValue; /* Current value */ + unsigned mxValue; /* Maximum value */ }; /* Methods for the wholenumber module */ |