diff options
author | David Tardon <dtardon@redhat.com> | 2014-06-28 07:22:23 +0200 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2014-06-28 07:22:23 +0200 |
commit | 6af39266090773950a1e0de64d6b7487fcd38ad3 (patch) | |
tree | 969b7ea8a7b7bfe36812d13a76db54d431a2074c /connectivity/source/drivers/odbc | |
parent | 924a28a7b1dc2f89e6940630057557f5f03494df (diff) |
WaE: null argument where non-null required (argument 2)
Change-Id: I3eb71120aed85a4ec2c697d149006bce063d983e
Diffstat (limited to 'connectivity/source/drivers/odbc')
-rw-r--r-- | connectivity/source/drivers/odbc/OPreparedStatement.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx index e2bf7ce3624f..c40c665da303 100644 --- a/connectivity/source/drivers/odbc/OPreparedStatement.cxx +++ b/connectivity/source/drivers/odbc/OPreparedStatement.cxx @@ -354,7 +354,8 @@ void OPreparedStatement::setParameter(const sal_Int32 parameterIndex, const sal_ nCharLen = u.size(); nByteLen = 4 * nCharLen; pData = allocBindBuf(parameterIndex, nByteLen); - memcpy(pData, u.empty() ? 0 : &u[0], nByteLen); + if (!u.empty()) + memcpy(pData, &u[0], nByteLen); } } else |