diff options
author | Christian Hesse <mail@eworm.de> | 2013-10-28 09:50:53 +0100 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2013-10-28 09:50:53 +0100 |
commit | 64a479c75322d78faf4f9bef26ba1d5e3f95dd85 (patch) | |
tree | 73f88bbca09ca40d895f5f195b08f7eed5e07e5d /pacredir.c | |
parent | 2ff9a186b720b07c121c9b81a3e072bc56b964f6 (diff) | |
download | paccache-64a479c75322d78faf4f9bef26ba1d5e3f95dd85.tar.gz paccache-64a479c75322d78faf4f9bef26ba1d5e3f95dd85.tar.zst |
initialize variables in struct
Diffstat (limited to 'pacredir.c')
-rw-r--r-- | pacredir.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -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; |