Merge branch 'gslice-use-G_APPROX_VALUE-macro' into 'master'

gslice: Use a convenience macro

See merge request GNOME/glib!765
This commit is contained in:
Sebastian Dröge 2019-04-09 08:57:09 +00:00
commit 6b8c9c79e1

View File

@ -640,10 +640,8 @@ magazine_cache_trim (Allocator *allocator,
/* trim magazine cache from tail */
ChunkLink *current = magazine_chain_prev (allocator->magazines[ix]);
ChunkLink *trash = NULL;
while ((stamp >= magazine_chain_uint_stamp (current) &&
stamp - magazine_chain_uint_stamp (current) >= allocator->config.working_set_msecs) ||
(stamp <= magazine_chain_uint_stamp (current) &&
magazine_chain_uint_stamp (current) - stamp >= allocator->config.working_set_msecs))
while (!G_APPROX_VALUE(stamp, magazine_chain_uint_stamp (current),
allocator->config.working_set_msecs))
{
/* unlink */
ChunkLink *prev = magazine_chain_prev (current);