Use xcalloc for initial item - sacc - sacc(omys), simple console gopher client
HTML git clone git://bitreich.org/sacc/ git://enlrupgkhuxnvlhsf6lc3fziv5h2hhfrinws65d7roiv6bfj7d652fid.onion/sacc/
DIR Log
DIR Files
DIR Refs
DIR Tags
DIR LICENSE
---
DIR commit 15dc331af5d4edf8a73aba2badb74e636fed71e2
DIR parent d2146543349ef8bde18732075dff69de5fd346a3
HTML Author: Quentin Rameau <quinq@fifth.space>
Date: Tue, 18 Jul 2017 14:33:06 +0200
Use xcalloc for initial item
Diffstat:
M sacc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
---
DIR diff --git a/sacc.c b/sacc.c
@@ -613,13 +613,12 @@ moldentry(char *url)
if (*host == '\0' || *port == '\0' || ipv6)
die("Can't parse url");
- entry = xmalloc(sizeof(Item));
+ entry = xcalloc(sizeof(Item));
entry->type = gopherpath[0];
entry->username = entry->selector = ++gopherpath;
entry->host = host;
entry->port = port;
entry->entry = entry;
- entry->raw = entry->tag = entry->dat = NULL;
return entry;
}