[Libreoffice-commits] core.git: connectivity/source
David Tardon
dtardon at redhat.com
Fri Jun 27 22:27:52 PDT 2014
connectivity/source/drivers/odbc/OPreparedStatement.cxx | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
New commits:
commit 6af39266090773950a1e0de64d6b7487fcd38ad3
Author: David Tardon <dtardon at redhat.com>
Date: Sat Jun 28 07:22:23 2014 +0200
WaE: null argument where non-null required (argument 2)
Change-Id: I3eb71120aed85a4ec2c697d149006bce063d983e
diff --git a/connectivity/source/drivers/odbc/OPreparedStatement.cxx b/connectivity/source/drivers/odbc/OPreparedStatement.cxx
index e2bf7ce..c40c665 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
More information about the Libreoffice-commits
mailing list