From: short <> Date: Fri, 22 Aug 2003 09:31:51 +0000 (+0000) Subject: captive_shared_cache_map_set_data_valid() validates the subset of the range. X-Git-Tag: bp_captive~17 X-Git-Url: http://git.jankratochvil.net/?p=captive.git;a=commitdiff_plain;h=acd510f7674bae3bfbb9d1f8a207e9ad159857d1 captive_shared_cache_map_set_data_valid() validates the subset of the range. - It validated the superset before - even the bytes not wished to be valid. --- diff --git a/src/libcaptive/cc/sharedcachemap.c b/src/libcaptive/cc/sharedcachemap.c index 4dbd2da..c8ecba4 100644 --- a/src/libcaptive/cc/sharedcachemap.c +++ b/src/libcaptive/cc/sharedcachemap.c @@ -441,8 +441,9 @@ guint64 now; g_return_if_fail(start<=end); g_return_if_fail(end<=CAPTIVE_ROUND_UP64(captive_shared_cache_map_object->AllocationSize,PAGE_SIZE)); - start=CAPTIVE_ROUND_DOWN64(start,PAGE_SIZE); - end=CAPTIVE_ROUND_UP64(end,PAGE_SIZE); + start=CAPTIVE_ROUND_UP64(start,PAGE_SIZE); + end=CAPTIVE_ROUND_DOWN64(end,PAGE_SIZE); + /* We may get endpages[now/PAGE_SIZE].data_valid=TRUE;