summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-06-28 07:22:23 +0200
committerDavid Tardon <dtardon@redhat.com>2014-06-28 07:22:23 +0200
commit6af39266090773950a1e0de64d6b7487fcd38ad3 (patch)
tree969b7ea8a7b7bfe36812d13a76db54d431a2074c /connectivity
parent924a28a7b1dc2f89e6940630057557f5f03494df (diff)
WaE: null argument where non-null required (argument 2)
Change-Id: I3eb71120aed85a4ec2c697d149006bce063d983e
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/odbc/OPreparedStatement.cxx3
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