From 10977eb209e743cf0010fd43ecf66f96815fad2f Mon Sep 17 00:00:00 2001 From: Derick Hawcroft Date: Thu, 25 Jun 2009 08:24:50 +1000 Subject: save on a couple of mallocs --- src/sql/drivers/psql/qsql_psql.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sql/drivers/psql/qsql_psql.cpp b/src/sql/drivers/psql/qsql_psql.cpp index ed9b98c..770df4c 100644 --- a/src/sql/drivers/psql/qsql_psql.cpp +++ b/src/sql/drivers/psql/qsql_psql.cpp @@ -834,7 +834,7 @@ bool QPSQLDriver::commitTransaction() if (d->pro == QPSQLDriver::Version8 || d->pro == QPSQLDriver::Version81 || d->pro == QPSQLDriver::Version82) { - transaction_failed = QByteArray(PQcmdStatus(res)) == QByteArray("ROLLBACK")?true:false; + transaction_failed = qstrcmp(PQcmdStatus(res), "ROLLBACK") == 0; } if (!res || PQresultStatus(res) != PGRES_COMMAND_OK || transaction_failed) { -- cgit v0.12