aboutsummaryrefslogtreecommitdiffstats
path: root/pacredir.c
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2013-10-28 09:50:53 +0100
committerGravatar Christian Hesse <mail@eworm.de>2013-10-28 09:50:53 +0100
commit64a479c75322d78faf4f9bef26ba1d5e3f95dd85 (patch)
tree73f88bbca09ca40d895f5f195b08f7eed5e07e5d /pacredir.c
parent2ff9a186b720b07c121c9b81a3e072bc56b964f6 (diff)
downloadpacredir-64a479c75322d78faf4f9bef26ba1d5e3f95dd85.tar.gz
pacredir-64a479c75322d78faf4f9bef26ba1d5e3f95dd85.tar.zst
initialize variables in struct
Diffstat (limited to 'pacredir.c')
-rw-r--r--pacredir.c6
1 files changed, 6 insertions, 0 deletions
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;