migration: Make cache size elements use the right types

Signed-off-by: Juan Quintela <quintela@redhat.com>
Reviewed-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
This commit is contained in:
Juan Quintela 2017-10-06 18:17:41 +02:00
parent ceaaecb49f
commit 9ca3f96394
2 changed files with 5 additions and 5 deletions

View File

@ -39,12 +39,12 @@ struct CacheItem {
struct PageCache {
CacheItem *page_cache;
unsigned int page_size;
int64_t max_num_items;
int64_t num_items;
size_t page_size;
size_t max_num_items;
size_t num_items;
};
PageCache *cache_init(int64_t num_pages, unsigned int page_size)
PageCache *cache_init(size_t num_pages, size_t page_size)
{
int64_t i;

View File

@ -28,7 +28,7 @@ typedef struct PageCache PageCache;
* @num_pages: cache maximal number of cached pages
* @page_size: cache page size
*/
PageCache *cache_init(int64_t num_pages, unsigned int page_size);
PageCache *cache_init(size_t num_pages, size_t page_size);
/**
* cache_fini: free all cache resources