summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2020-10-12 18:49:56 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2020-10-12 20:13:46 +0200
commit0ea6495717a3245d1da079b5d9570a6cf776ef1a (patch)
treeb4cb44dbdb218fd8efc063d9f420a5f12a6ab994 /util.c
parenta1516cb7869a0dd99ebaacf846ad4161f2b9b9a2 (diff)
remove unneeded check for NUL terminator
Diffstat (limited to 'util.c')
-rw-r--r--util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/util.c b/util.c
index f4304ec..a91ca2e 100644
--- a/util.c
+++ b/util.c
@@ -24,8 +24,8 @@ parseuri(const char *s, struct uri *u, int rel)
p += 2; /* skip "//" */
} else {
/* protocol part */
- for (p = s; *p && (isalpha((unsigned char)*p) || isdigit((unsigned char)*p) ||
- *p == '+' || *p == '-' || *p == '.'); p++)
+ for (p = s; isalpha((unsigned char)*p) || isdigit((unsigned char)*p) ||
+ *p == '+' || *p == '-' || *p == '.'; p++)
;
if (!strncmp(p, "://", 3)) {
if ((size_t)(p - s) >= sizeof(u->proto))