diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-09-14 01:42:30 -0500 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2012-09-14 03:49:21 -0500 |
commit | b42094b2b06f4837a6df65e6b87caf8139fc0d0d (patch) | |
tree | 134a3f25c7e676e092a7ac5c3b29f78b98dbc301 /sal/rtl | |
parent | e50ab7bb891cbd7b5f95c124ce29a3e595b599ee (diff) |
remove use of SAL_MIN() macro
Change-Id: Ia91118388240c9a54d010b94aef34ad528ce5761
Diffstat (limited to 'sal/rtl')
-rw-r--r-- | sal/rtl/source/alloc_cache.cxx | 7 | ||||
-rw-r--r-- | sal/rtl/source/alloc_global.cxx | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/sal/rtl/source/alloc_cache.cxx b/sal/rtl/source/alloc_cache.cxx index 8e6860253448..a29b0785eba0 100644 --- a/sal/rtl/source/alloc_cache.cxx +++ b/sal/rtl/source/alloc_cache.cxx @@ -658,7 +658,10 @@ rtl_cache_depot_dequeue ( /* update depot stats */ depot->m_mag_count--; - depot->m_curr_min = SAL_MIN(depot->m_curr_min, depot->m_mag_count); + if(depot->m_curr_min > depot->m_mag_count) + { + depot->m_curr_min = depot->m_mag_count; + } } return (mag); } @@ -1470,7 +1473,7 @@ rtl_cache_depot_wsupdate ( depot->m_prev_min = depot->m_curr_min; depot->m_curr_min = depot->m_mag_count; - npurge = SAL_MIN(depot->m_curr_min, depot->m_prev_min); + npurge = depot->m_curr_min < depot->m_prev_min ? depot->m_curr_min : depot->m_prev_min; for (; npurge > 0; npurge--) { rtl_cache_magazine_type * mag = rtl_cache_depot_dequeue (depot); diff --git a/sal/rtl/source/alloc_global.cxx b/sal/rtl/source/alloc_global.cxx index 59213a11a8ea..7ac963c1cf2b 100644 --- a/sal/rtl/source/alloc_global.cxx +++ b/sal/rtl/source/alloc_global.cxx @@ -170,7 +170,7 @@ void * SAL_CALL rtl_reallocateMemory_CUSTOM (void * p, sal_Size n) SAL_THROW_EXT p = rtl_allocateMemory (n); if (p != 0) { - memcpy (p, p_old, SAL_MIN(n, n_old)); + memcpy (p, p_old, (n < n_old) ? n : n_old); rtl_freeMemory (p_old); } } |