Browse Source

fix assertion

git-svn-id: svn://svn.lighttpd.net/xcache/trunk@179 c26eb9a1-5813-0410-bd6c-c2e55f420ca7
1.2
Xuefer 15 years ago
parent
commit
5e2a56b7b0
  1. 8
      mmap.c

8
mmap.c

@ -84,19 +84,19 @@ static XC_SHM_IS_READONLY(xc_mmap_is_readonly) /* {{{ */
static XC_SHM_TO_READWRITE(xc_mmap_to_readwrite) /* {{{ */
{
if (shm->diff) {
assert(xc_mmap_is_readonly(p));
assert(xc_mmap_is_readonly(shm, p));
p = PTR_SUB(p, shm->diff);
}
assert(xc_mmap_is_readwrite(p));
assert(xc_mmap_is_readwrite(shm, p));
return p;
}
/* }}} */
static XC_SHM_TO_READONLY(xc_mmap_to_readonly) /* {{{ */
{
assert(xc_shm_is_readwrite(p));
assert(xc_mmap_is_readwrite(shm, p));
if (shm->diff) {
p = PTR_ADD(p, shm->diff);
assert(xc_mmap_is_readonly(p));
assert(xc_mmap_is_readonly(shm, p));
}
return p;
}

Loading…
Cancel
Save