summaryrefslogtreecommitdiff
path: root/url.c
diff options
context:
space:
mode:
Diffstat (limited to 'url.c')
-rw-r--r--url.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/url.c b/url.c
index 3e71289..6ed2c19 100644
--- a/url.c
+++ b/url.c
@@ -51,7 +51,7 @@ check_request_path(char *path)
}
size_t
-url_build(char *dst, size_t dst_size, int count,...)
+url_build(char *dst, size_t dst_size,...)
{
va_list path_list;
const char *path;
@@ -60,15 +60,12 @@ url_build(char *dst, size_t dst_size, int count,...)
dst[0] = '\0';
w_size = 0;
- va_start(path_list, count);
- for (path_index = 0; path_index < count; path_index++) {
+ va_start(path_list, dst_size);
+ while ((path = va_arg(path_list, char *)) != NULL) {
/* no more space in dst buffer */
if (w_size >= dst_size)
break;
- path = va_arg(path_list, char *);
-
- assert(path != NULL);
if (path[0] == '\0')
continue;