From fc01077a24ffd83132826bd0d09c8ead70e759cc Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Wed, 24 Aug 2011 14:38:39 +0200 Subject: [PATCH] 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. --- http_recv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5