persistentstorage/sql/SRC/Server/SqlSrvDatabase.cpp
branchGCC_SURGE
changeset 38 c4e342fcf0c8
parent 22 a7ba600cb39d
child 31 ba1c4f4a893f
--- a/persistentstorage/sql/SRC/Server/SqlSrvDatabase.cpp	Mon Jun 21 22:46:09 2010 +0100
+++ b/persistentstorage/sql/SRC/Server/SqlSrvDatabase.cpp	Thu Jul 22 16:49:09 2010 +0100
@@ -963,12 +963,8 @@
 			err = StmtExec(stmtHandle);
 			}
 		}
-	TInt err2 = ::FinalizeStmtHandle(stmtHandle);
+	(void)::FinalizeStmtHandle(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed.
 	CleanupStack::PopAndDestroy();//TCleanupItem(&EnableAuthorizer, &iAuthorizerDisabled)
-	if(err == KErrNone && err2 != KErrNone)
-		{//::FinalizeStmtHandle() has failed
-		err = err2;
-		}
 	__SQLLEAVE_IF_ERROR(err);
 	
 	TAttachCleanup attachCleanup(*this, aDbName);
@@ -1013,11 +1009,7 @@
 			err = StmtExec(stmtHandle);
 			}
 		}
-	TInt err2 = ::FinalizeStmtHandle(stmtHandle);
-	if(err == KErrNone && err2 != KErrNone)
-		{//::FinalizeStmtHandle() has failed
-		err = err2;
-		}
+	(void)::FinalizeStmtHandle(stmtHandle);//sqlite3_finalize() fails only if an invalid statement handle is passed.
 	iAuthorizerDisabled	= EFalse;
 	return err;
 	}