summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2019-04-06 14:29:32 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2019-04-06 14:29:32 +0200
commit827b00dc552c1c1087c8bfb36d6aba7399960878 (patch)
treeb0d4bc1a5797156c00351667f48a1b2da70f6178
parent3031d855807de20fc86cd3dd2375ce9473e86947 (diff)
util: remove unnecesary cast and initialization
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index e5d0ada..d7e1258 100644
--- a/util.c
+++ b/util.c
@@ -98,7 +98,7 @@ encodeuri(char *buf, size_t bufsiz, const char *s)
size_t i, b;
for (i = 0, b = 0; s[i]; i++) {
- if ((int)s[i] == ' ' ||
+ if (s[i] == ' ' ||
(unsigned char)s[i] > 127 ||
iscntrl((unsigned char)s[i])) {
if (b + 3 >= bufsiz)
@@ -126,7 +126,7 @@ absuri(char *buf, size_t bufsiz, const char *link, const char *base)
{
struct uri ulink, ubase;
char tmp[4096], *host, *p, *port;
- int r = -1, c;
+ int r, c;
size_t i;
buf[0] = '\0';