From: Andre Noll Date: Wed, 24 Aug 2011 12:38:39 +0000 (+0200) Subject: http_recv: Trivial cleanup. X-Git-Tag: v0.4.11~27 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=fc01077a24ffd83132826bd0d09c8ead70e759cc;p=paraslash.git http_recv: Trivial cleanup. This variant to specify the size of an allocation is to be preferred because (a) it's shorter, and (b) it breaks at compile time if "tmp" is renamed but the argument to sizeof() was not updated accordingly. --- diff --git a/http_recv.c b/http_recv.c index c3d918c5..b4bf1530 100644 --- a/http_recv.c +++ b/http_recv.c @@ -141,7 +141,7 @@ static void http_recv_close(struct receiver_node *rn) static void *http_recv_parse_config(int argc, char **argv) { - struct http_recv_args_info *tmp = para_calloc(sizeof(struct http_recv_args_info)); + struct http_recv_args_info *tmp = para_calloc(sizeof(*tmp)); if (!http_recv_cmdline_parser(argc, argv, tmp)) return tmp;