]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
http_recv: Trivial cleanup.
authorAndre Noll <maan@systemlinux.org>
Wed, 24 Aug 2011 12:38:39 +0000 (14:38 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 7 Apr 2012 23:19:33 +0000 (01:19 +0200)
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

index c3d918c51ab37069c05f879a2492b38d1ce6fd4d..b4bf1530d811fefb04c4f5b107e752e45d8e9048 100644 (file)
@@ -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;