summaryrefslogtreecommitdiff
path: root/browse.c
diff options
context:
space:
mode:
authorVincent Douillet <vincent@vdouillet.fr>2023-08-19 18:15:55 +0200
committerVincent Douillet <vincent@vdouillet.fr>2023-08-19 18:16:38 +0200
commit26a77087027327d72d7229866a1ce12ad11a4d63 (patch)
treebfbf6b6704c8f853a1063b7ff3c7164d4b085ae1 /browse.c
parent7caf4597bcfb64dac04b7190dab1022f1bc4e141 (diff)
rework url_build function to end varargs with NULL
Diffstat (limited to 'browse.c')
-rw-r--r--browse.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/browse.c b/browse.c
index 7526853..a129eb6 100644
--- a/browse.c
+++ b/browse.c
@@ -49,7 +49,8 @@ build_browse_url(struct kreq * r, char *url, size_t url_size, const char *file)
char *page_name;
page_name = strlen(r->pagename) == 0 ? BROWSE_URL : r->pagename;
- return url_build(url, url_size, 4, r->pname, page_name, r->path, file);
+ return url_build(url, url_size, r->pname, page_name, r->path, file,
+ NULL);
}
void
@@ -67,7 +68,8 @@ browse(struct kreq * r)
http_exit(r, KHTTP_400, "browse: Invalid request path");
/* list requested directory content */
- url_size = url_build(current_dir, URL_LENGTH_MAX, 2, DATA_DIR, r->path);
+ url_size = url_build(current_dir, URL_LENGTH_MAX, DATA_DIR, r->path,
+ NULL);
if (url_size == 0)
http_exit(r, KHTTP_404, "browse: Unable to build data path");
if (url_size >= URL_LENGTH_MAX)