From 7f11ef506465896705f15c39bd0416d96ca651a8 Mon Sep 17 00:00:00 2001 From: Hiltjo Posthuma Date: Sat, 8 Aug 2015 00:51:53 +0200 Subject: util: just zero strings by null-terminating first byte --- util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- cgit v1.2.3