From: Dan Sheppard Date: Mon, 12 May 2025 11:13:42 +0000 (+0100) Subject: minor tidy X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~dans/git?a=commitdiff_plain;h=c332c74104d73a9781175c089da016e3eef825d3;p=coquet.git minor tidy --- diff --git a/src/page.c b/src/page.c index 05e08dc..1a79787 100644 --- a/src/page.c +++ b/src/page.c @@ -1,14 +1,16 @@ #include #include "page.h" +static off_t nursery_size_bytes(struct cq_filemeta *fm) { + return (2<<(fm->super.current.nursery_size + fm->super.current.block_size)); +} + off_t cq_offset_main_page(coquet_t *cq, int which_file, u_int64_t pgid) { struct cq_filemeta *fm; off_t header; - off_t nursery; fm = &(cq->filemeta[which_file]); - nursery = (2<<(fm->super.current.nursery_size + fm->super.current.block_size)); - header = 2*SUPER_BYTES + nursery; + header = 2*SUPER_BYTES + nursery_size_bytes(fm); return header + (pgid-1) * (1<super.current.block_size); }