X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=page_cache.c;h=5f8578736e041b32774ad23aa69d31b9e30194a1;hb=0ab8ed18a6fe98bfc82705b0f041fbf2a8ca5b60;hp=a2809db2f545b8e8bea6e9a0dece340e484f7c6f;hpb=b66e10e4c9ae738412b9742db49457f6b703e349;p=mirror_qemu.git 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)