From ebb10b0ad3fc120b5ad219f9155c80311693f5af Mon Sep 17 00:00:00 2001 From: Andrew Clayton Date: Fri, 12 Jul 2024 00:49:28 +0100 Subject: Fix a comment typo for 'Memory-only buffers' in src/nxt_buf.h As the comment for 'Memory-only buffers' says "... it is equal to offsetof(nxt_buf_t, file.pos)" and "... that is it is nxt_buf_t without file and mmap part" Those are at odds with each other, 'file.pos' comes _after_ 'file' in the nxt_buf_t structure. Fix the 'offset()' bit of the comment to reflect that and to match the relevant macro #define NXT_BUF_MEM_SIZE offsetof(nxt_buf_t, file) Signed-off-by: Andrew Clayton --- src/nxt_buf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/nxt_buf.h') diff --git a/src/nxt_buf.h b/src/nxt_buf.h index f1e2879f..a561ef4e 100644 --- a/src/nxt_buf.h +++ b/src/nxt_buf.h @@ -13,7 +13,7 @@ * should be allocated by appropriate nxt_buf_XXX_alloc() function. * * 1) Memory-only buffers, their size is less than nxt_buf_t size, it - * is equal to offsetof(nxt_buf_t, file_pos), that is it is nxt_buf_t + * is equal to offsetof(nxt_buf_t, file), that is it is nxt_buf_t * without file and mmap part. The buffers are frequently used, so * the reduction allows to save 20-32 bytes depending on platform. * -- cgit