summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index e9461ea..e5d0ada 100644
--- a/util.c
+++ b/util.c
@@ -149,7 +149,7 @@ absuri(char *buf, size_t bufsiz, const char *link, const char *base)
host,
port[0] ? ":" : "",
port);
- if (r == -1 || (size_t)r >= sizeof(tmp))
+ if (r < 0 || (size_t)r >= sizeof(tmp))
return -1; /* error or truncation */
/* relative to root */