/ Check-in [0df061b0]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Add a couple of pointer type casts to test file test_quota.c.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 0df061b0554c749cade4ec8ddabe453934825bb2
User & Date: dan 2011-06-15 17:04:43
Context
2011-06-15
19:18
Further tweaks to the wal7.test test case. check-in: 177e2d72 user: drh tags: trunk
17:04
Add a couple of pointer type casts to test file test_quota.c. check-in: 0df061b0 user: dan tags: trunk
16:07
Fix the wal7.test script so that it works even if secure_delete is engaged. check-in: 68fb7a54 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to src/test_quota.c.

   319    319       pSubOpen = quotaSubOpen(pConn);
   320    320       rc = pOrigVfs->xOpen(pOrigVfs, zName, pSubOpen, flags, pOutFlags);
   321    321       if( rc==SQLITE_OK ){
   322    322         for(pFile=pGroup->pFiles; pFile && strcmp(pFile->zFilename, zName);
   323    323             pFile=pFile->pNext){}
   324    324         if( pFile==0 ){
   325    325           int nName = strlen(zName);
   326         -        pFile = sqlite3_malloc( sizeof(*pFile) + nName + 1 );
          326  +        pFile = (quotaFile *)sqlite3_malloc( sizeof(*pFile) + nName + 1 );
   327    327           if( pFile==0 ){
   328    328             quotaLeave();
   329    329             pSubOpen->pMethods->xClose(pSubOpen);
   330    330             return SQLITE_NOMEM;
   331    331           }
   332    332           memset(pFile, 0, sizeof(*pFile));
   333    333           pFile->zFilename = (char*)&pFile[1];
................................................................................
   679    679     }
   680    680     if( pGroup==0 ){
   681    681       int nPattern = strlen(zPattern);
   682    682       if( iLimit<=0 ){
   683    683         quotaLeave();
   684    684         return SQLITE_OK;
   685    685       }
   686         -    pGroup = sqlite3_malloc( sizeof(*pGroup) + nPattern + 1 );
          686  +    pGroup = (quotaGroup *)sqlite3_malloc( sizeof(*pGroup) + nPattern + 1 );
   687    687       if( pGroup==0 ){
   688    688         quotaLeave();
   689    689         return SQLITE_NOMEM;
   690    690       }
   691    691       memset(pGroup, 0, sizeof(*pGroup));
   692    692       pGroup->zPattern = (char*)&pGroup[1];
   693    693       memcpy((char *)pGroup->zPattern, zPattern, nPattern+1);