From 64a479c75322d78faf4f9bef26ba1d5e3f95dd85 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 28 Oct 2013 09:50:53 +0100 Subject: initialize variables in struct --- pacredir.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pacredir.c b/pacredir.c index 7df675f..888337b 100644 --- a/pacredir.c +++ b/pacredir.c @@ -99,6 +99,12 @@ static void resolve_callback_new(AvahiServiceResolver *r, AVAHI_GCC_UNUSED Avahi } printf("Adding host: %s, %s on port %d\n", host, type, port); tmphosts->host = strdup(host); + tmphosts->pacserve.port = 0; + tmphosts->pacserve.online = 0; + tmphosts->pacserve.bad = 0; + tmphosts->pacdbserve.port = 0; + tmphosts->pacdbserve.online = 0; + tmphosts->pacdbserve.bad = 0; tmphosts->next = realloc(tmphosts->next, sizeof(struct hosts)); tmphosts->next->host = NULL; tmphosts->next->next = NULL; -- cgit v1.2.3-54-g00ecf