]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
eloop-bench: use calloc
authorRoy Marples <roy@marples.name>
Fri, 5 Jan 2018 19:07:35 +0000 (19:07 +0000)
committerRoy Marples <roy@marples.name>
Fri, 5 Jan 2018 19:07:35 +0000 (19:07 +0000)
tests/eloop-bench/eloop-bench.c

index 813fedf19d815fb447f4f6259d393c364255411d..0f90e824c3ad1ed303fe7b5f1856e2750e5ccc89 100644 (file)
@@ -149,7 +149,7 @@ main(int argc, char **argv)
        if (nactive > npipes)
                nactive = npipes;
 
-       pipes = malloc(sizeof(*p) * npipes);
+       pipes = calloc(npipes, sizeof(*p));
        if (pipes == NULL)
                err(EXIT_FAILURE, "malloc");