From 343c4c7072cd5ee16f1e444089db8c7e2ad92430 Mon Sep 17 00:00:00 2001 From: Yang Tse Date: Wed, 9 Jun 2010 16:48:19 +0200 Subject: code simplification --- lib/ftplistparser.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lib/ftplistparser.c b/lib/ftplistparser.c index 3dd661788..08a794294 100644 --- a/lib/ftplistparser.c +++ b/lib/ftplistparser.c @@ -190,12 +190,7 @@ struct ftp_parselist_data { struct ftp_parselist_data *Curl_ftp_parselist_data_alloc(void) { - struct ftp_parselist_data *parselist_data = - malloc(sizeof(struct ftp_parselist_data)); - if(!parselist_data) - return ZERO_NULL; - memset(parselist_data, 0, sizeof(struct ftp_parselist_data)); - return parselist_data; + return calloc(1, sizeof(struct ftp_parselist_data)); } -- cgit v1.2.3