summaryrefslogtreecommitdiff
path: root/store
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2012-09-14 01:42:30 -0500
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-09-14 03:49:21 -0500
commitb42094b2b06f4837a6df65e6b87caf8139fc0d0d (patch)
tree134a3f25c7e676e092a7ac5c3b29f78b98dbc301 /store
parente50ab7bb891cbd7b5f95c124ce29a3e595b599ee (diff)
remove use of SAL_MIN() macro
Change-Id: Ia91118388240c9a54d010b94aef34ad528ce5761
Diffstat (limited to 'store')
-rw-r--r--store/source/stordata.hxx4
-rw-r--r--store/source/storlckb.cxx21
2 files changed, 18 insertions, 7 deletions
diff --git a/store/source/stordata.hxx b/store/source/stordata.hxx
index cbf5cd2b46f3..cbd004482e47 100644
--- a/store/source/stordata.hxx
+++ b/store/source/stordata.hxx
@@ -732,11 +732,11 @@ public:
return rtl_crc32 (nPath, pszName, rtl_str_getLength(pszName));
}
- sal_Size getName (sal_Char * pBuffer, sal_Size nBufsiz) const
+ sal_Size getName (sal_Char * pBuffer, sal_Size nBufsize) const
{
sal_Char const * pszName = PAGE().m_aNameBlock.m_pData;
sal_Size nLength = rtl_str_getLength(pszName);
- memcpy (pBuffer, pszName, SAL_MIN(nLength, nBufsiz));
+ memcpy (pBuffer, pszName, nLength < nBufsize ? nLength : nBufsize);
return nLength;
}
diff --git a/store/source/storlckb.cxx b/store/source/storlckb.cxx
index f9c0ff24efa3..539bf3707cac 100644
--- a/store/source/storlckb.cxx
+++ b/store/source/storlckb.cxx
@@ -167,8 +167,10 @@ storeError OStoreLockBytes::readAt (
nOffset, m_xNode->capacity());
sal_uInt32 nLength = sal_uInt32(aDescr.m_nLength);
- nLength = SAL_MIN(nLength, nBytes);
-
+ if(nLength > nBytes)
+ {
+ nLength = nBytes;
+ }
memcpy (
&pData[rnDone],
&m_xNode->m_pData[aDescr.m_nOffset],
@@ -186,7 +188,10 @@ storeError OStoreLockBytes::readAt (
nOffset - m_xNode->capacity(), OStoreDataPageData::capacity(m_xNode->m_aDescr)); // @@@
sal_uInt32 nLength = sal_uInt32(aDescr.m_nLength);
- nLength = SAL_MIN(nLength, nBytes);
+ if(nLength > nBytes)
+ {
+ nLength = nBytes;
+ }
storeError eErrCode = aPage.read (aDescr.m_nPage, aData, *m_xManager);
if (eErrCode != store_E_None)
@@ -259,7 +264,10 @@ storeError OStoreLockBytes::writeAt (
nOffset, m_xNode->capacity());
sal_uInt32 nLength = sal_uInt32(aDescr.m_nLength);
- nLength = SAL_MIN(nLength, nBytes);
+ if(nLength > nBytes)
+ {
+ nLength = nBytes;
+ }
memcpy (
&m_xNode->m_pData[aDescr.m_nOffset],
@@ -312,7 +320,10 @@ storeError OStoreLockBytes::writeAt (
}
// Modify data page.
- nLength = SAL_MIN(nLength, nBytes);
+ if(nLength > nBytes)
+ {
+ nLength = nBytes;
+ }
memcpy (
&xData->m_pData[aDescr.m_nOffset],
&pData[rnDone], nLength);