equal
deleted
inserted
replaced
503 } |
503 } |
504 User::LeaveIfError ( error ); |
504 User::LeaveIfError ( error ); |
505 CleanupClosePushL( dstFile ); |
505 CleanupClosePushL( dstFile ); |
506 |
506 |
507 // resize destination file |
507 // resize destination file |
508 TInt remainingBytes; |
508 TInt remainingBytes = 0; |
509 User::LeaveIfError( srcFile.Size(remainingBytes) ); |
509 User::LeaveIfError( srcFile.Size(remainingBytes) ); |
510 User::LeaveIfError( dstFile.SetSize(remainingBytes) ); |
510 User::LeaveIfError( dstFile.SetSize(remainingBytes) ); |
511 |
511 |
512 // allocate buffer |
512 // allocate buffer |
513 const TInt KBigBufSize = 512 * 1024; |
513 const TInt KBigBufSize = 512 * 1024; |
1852 #ifdef __RAMDISK_PERF_ENABLE |
1852 #ifdef __RAMDISK_PERF_ENABLE |
1853 if( database.iUseRAMdb ) |
1853 if( database.iUseRAMdb ) |
1854 { |
1854 { |
1855 delete database.iAliasname; |
1855 delete database.iAliasname; |
1856 database.iAliasname = HBufC::NewL(KAliasName().Length()); |
1856 database.iAliasname = HBufC::NewL(KAliasName().Length()); |
|
1857 // coverity[size_error] |
|
1858 // coverity[buffer_alloc] |
1857 HBufC* temp = HBufC::NewLC(2); // form of DE, DF, DX,... |
1859 HBufC* temp = HBufC::NewLC(2); // form of DE, DF, DX,... |
1858 temp->Des().Append(iRAMDrive); // length == 2 |
1860 temp->Des().Append(iRAMDrive); // length == 2 |
1859 TDriveUnit pdrive( database.iDrive ); |
1861 TDriveUnit pdrive( database.iDrive ); |
1860 temp->Des().Append(pdrive.Name().Left(1)); //length == 2+ 1 |
1862 temp->Des().Append(pdrive.Name().Left(1)); //length == 2+ 1 |
1861 database.iAliasname->Des().Format(KRAMAliasName, temp); |
1863 database.iAliasname->Des().Format(KRAMAliasName, temp); |
2206 void CMPXDbManager::PrintTableValuesL( |
2208 void CMPXDbManager::PrintTableValuesL( |
2207 RSqlStatement& aStatement) |
2209 RSqlStatement& aStatement) |
2208 { |
2210 { |
2209 TInt columnCount(GetColumnCountL(aStatement)); |
2211 TInt columnCount(GetColumnCountL(aStatement)); |
2210 TInt err(KErrNone); |
2212 TInt err(KErrNone); |
|
2213 // coverity[incorrect_multiplication] |
|
2214 // coverity[buffer_alloc] |
2211 HBufC* tableRow = HBufC::NewLC(255 * columnCount); |
2215 HBufC* tableRow = HBufC::NewLC(255 * columnCount); |
2212 TPtr tableRowPtr = tableRow->Des(); |
2216 TPtr tableRowPtr = tableRow->Des(); |
2213 |
2217 |
2214 while ((err = aStatement.Next()) == KSqlAtRow) |
2218 while ((err = aStatement.Next()) == KSqlAtRow) |
2215 { |
2219 { |
2297 // |
2301 // |
2298 void CMPXDbManager::FindAllTablesL( |
2302 void CMPXDbManager::FindAllTablesL( |
2299 const TDesC& aAlias, |
2303 const TDesC& aAlias, |
2300 RArray<HBufC*>& aTableName) |
2304 RArray<HBufC*>& aTableName) |
2301 { |
2305 { |
|
2306 CleanupClosePushL(aTableName); |
2302 RSqlStatement statement; |
2307 RSqlStatement statement; |
2303 CleanupClosePushL(statement); |
2308 CleanupClosePushL(statement); |
2304 |
2309 |
2305 if (aAlias == KNullDesC) |
2310 if (aAlias == KNullDesC) |
2306 { |
2311 { |
2327 { |
2332 { |
2328 User::Leave(err); |
2333 User::Leave(err); |
2329 } |
2334 } |
2330 |
2335 |
2331 CleanupStack::PopAndDestroy(&statement); |
2336 CleanupStack::PopAndDestroy(&statement); |
|
2337 CleanupStack::Pop(); |
2332 } |
2338 } |
2333 |
2339 |
2334 // ---------------------------------------------------------------------------- |
2340 // ---------------------------------------------------------------------------- |
2335 // Prints the tables on the main or attached drives |
2341 // Prints the tables on the main or attached drives |
2336 // ---------------------------------------------------------------------------- |
2342 // ---------------------------------------------------------------------------- |