diff options
author | Jaron Kent-Dobias <jkentdobias@g.hmc.edu> | 2016-09-19 15:50:41 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jkentdobias@g.hmc.edu> | 2016-09-19 15:50:41 -0400 |
commit | 507fa95563fe417b4373ca8c389423136318d410 (patch) | |
tree | 1dea1d14a5913bb395e104d54054f0f35c21ce82 /src/fracture.c | |
parent | a235904d571652e99edcc9ff9639ec39c8fbc456 (diff) | |
download | fuse_networks-507fa95563fe417b4373ca8c389423136318d410.tar.gz fuse_networks-507fa95563fe417b4373ca8c389423136318d410.tar.bz2 fuse_networks-507fa95563fe417b4373ca8c389423136318d410.zip |
fixed some bugs
Diffstat (limited to 'src/fracture.c')
-rw-r--r-- | src/fracture.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/fracture.c b/src/fracture.c index 718fc05..81d755b 100644 --- a/src/fracture.c +++ b/src/fracture.c @@ -186,9 +186,9 @@ int main(int argc, char *argv[]) { char *a_filename; if (save_cluster_dist) { cluster_size_dist = - (uint32_t *)malloc(max_verts * sizeof(uint32_t)); + (uint32_t *)calloc(max_verts, sizeof(uint32_t)); avalanche_size_dist = - (uint32_t *)malloc(max_edges * sizeof(uint32_t)); + (uint32_t *)calloc(max_edges, sizeof(uint32_t)); c_filename = (char *)malloc(filename_len * sizeof(char)); a_filename = (char *)malloc(filename_len * sizeof(char)); @@ -241,7 +241,7 @@ int main(int argc, char *argv[]) { char *d_filename; if (save_damage) { damage = - (uint32_t *)malloc(max_edges * sizeof(uint32_t)); + (uint32_t *)calloc(max_edges, sizeof(uint32_t)); d_filename = (char *)malloc(filename_len * sizeof(char)); snprintf(d_filename, filename_len, "damg_%c_%c_%c_%d_%g_%g.dat", lattice_c, boundc, boundc2, L, beta, crack_len); |