summaryrefslogtreecommitdiffstats
path: root/src/sql
diff options
context:
space:
mode:
authorDerick Hawcroft <derick.hawcroft@nokia.com>2009-06-24 22:24:50 (GMT)
committerDerick Hawcroft <derick.hawcroft@nokia.com>2009-06-24 22:26:25 (GMT)
commit10977eb209e743cf0010fd43ecf66f96815fad2f (patch)
treef27f088baeba4a7324075f1f7bed0f85f6de7c65 /src/sql
parent74e782be57f22e41aeb6aa4bbec4e2921243097c (diff)
downloadQt-10977eb209e743cf0010fd43ecf66f96815fad2f.zip
Qt-10977eb209e743cf0010fd43ecf66f96815fad2f.tar.gz
Qt-10977eb209e743cf0010fd43ecf66f96815fad2f.tar.bz2
save on a couple of mallocs
Diffstat (limited to 'src/sql')
-rw-r--r--src/sql/drivers/psql/qsql_psql.cpp2
1 files changed, 1 insertions, 1 deletions
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) {