summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiltjo Posthuma <hiltjo@codemadness.org>2015-08-08 00:51:53 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2015-08-08 00:51:53 +0200
commit7f11ef506465896705f15c39bd0416d96ca651a8 (patch)
tree81685c28e9c70447ba84ea331c5711801afbb72e
parenta225b2a5376bee47fbda86c8aaa74ca7cc8a388a (diff)
util: just zero strings by null-terminating first byte
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 6f4b04e..9b3da1b 100644
--- a/util.c
+++ b/util.c
@@ -28,7 +28,7 @@ parseuri(const char *s, struct uri *u, int rel)
const char *p = s;
size_t i;
- memset(u, 0, sizeof(struct uri));
+ u->proto[0] = u->host[0] = u->path[0] = '\0';
if (!*s)
return 0;