commit 88831cf09c62318f09b46b3058733ff999856b7b
parent b5ad18773dae8601271d6d01ffa2a196a130b4fc
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date: Thu, 21 Mar 2024 11:15:01 -0700
Add length of pagedata's pages array
Diffstat:
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/page.h b/page.h
@@ -7,6 +7,7 @@ struct pagedata {
size_t dbid;
struct kvalid *keys;
char **pages; /* page names */
+ size_t pagesz; /* number of pages */
struct user *user;
size_t bodypos; /* for endpage() */
};
diff --git a/timekeeper.c b/timekeeper.c
@@ -56,7 +56,8 @@ main(void)
struct kfcgi *fcgi;
struct pagedata pd = {
.keys = keys,
- .pages = pages
+ .pages = pages,
+ .pagesz = Len(pages)
};
struct sqlbox_cfg cfg;
struct sqlbox_src srcs[] = {