diff options
author | Vincent Douillet <vincent@vdouillet.fr> | 2023-08-19 18:15:55 +0200 |
---|---|---|
committer | Vincent Douillet <vincent@vdouillet.fr> | 2023-08-19 18:16:38 +0200 |
commit | 26a77087027327d72d7229866a1ce12ad11a4d63 (patch) | |
tree | bfbf6b6704c8f853a1063b7ff3c7164d4b085ae1 /browse.c | |
parent | 7caf4597bcfb64dac04b7190dab1022f1bc4e141 (diff) |
rework url_build function to end varargs with NULL
Diffstat (limited to 'browse.c')
-rw-r--r-- | browse.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) |