summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2021-03-01 18:50:43 +0100
committerHiltjo Posthuma <hiltjo@codemadness.org>2021-03-01 18:50:43 +0100
commit16b7cc14e0681531d0d0e7c73e7c9ee903d0b1a9 (patch)
tree20ab2229478f6625d7e1c43e92c052aba00b9f3b
parentfef85e3c39946b50b337cdf57a4a3d530eb85ac2 (diff)
util.c: uri_makeabs: check initial base URI field, not dest `a` (style)
No functional difference because the base URI host is copied beforehand.
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 6aef1f3..e1ff9bd 100644
--- a/util.c
+++ b/util.c
@@ -166,7 +166,7 @@ uri_makeabs(struct uri *a, struct uri *u, struct uri *b)
} else if (u->path[0] == '/') {
strlcpy(a->path, u->path, sizeof(a->path));
} else {
- a->path[0] = (a->host[0] && b->path[0] != '/') ? '/' : '\0';
+ a->path[0] = (b->host[0] && b->path[0] != '/') ? '/' : '\0';
a->path[1] = '\0';
if ((p = strrchr(b->path, '/'))) {