diff options
Diffstat (limited to 'page_cache.c')
-rw-r--r-- | page_cache.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/page_cache.c b/page_cache.c index a2809db2f5..5f8578736e 100644 --- a/page_cache.c +++ b/page_cache.c @@ -111,11 +111,8 @@ void cache_fini(PageCache *cache) static size_t cache_get_cache_pos(const PageCache *cache, uint64_t address) { - size_t pos; - g_assert(cache->max_num_items); - pos = (address / cache->page_size) & (cache->max_num_items - 1); - return pos; + return (address / cache->page_size) & (cache->max_num_items - 1); } static CacheItem *cache_get_by_addr(const PageCache *cache, uint64_t addr) |