Apply coccinelle script to replace malloc(a*b)->calloc(a,b)

This commit is contained in:
Nick Mathewson
2014-08-13 10:36:06 -04:00
parent 5da821a8a3
commit 2bfd92d0d1
17 changed files with 60 additions and 62 deletions
+1 -1
View File
@@ -510,7 +510,7 @@ spawn_cpuworker(void)
connection_t *conn;
int err;
fdarray = tor_malloc(sizeof(tor_socket_t)*2);
fdarray = tor_calloc(sizeof(tor_socket_t), 2);
if ((err = tor_socketpair(AF_UNIX, SOCK_STREAM, 0, fdarray)) < 0) {
log_warn(LD_NET, "Couldn't construct socketpair for cpuworker: %s",
tor_socket_strerror(-err));