diff options
author | pants <jaron@kent-dobias.com> | 2016-09-08 12:28:07 -0400 |
---|---|---|
committer | pants <jaron@kent-dobias.com> | 2016-09-08 12:28:07 -0400 |
commit | 0b6e6a4337e8e9b6728f3604bb61a59365be3446 (patch) | |
tree | 389798c8a4638506a236a276e6847d65648f6640 /src/fortune | |
parent | cf272339a3b72cf192ba986d37e50de16a4cbe49 (diff) | |
download | fuse_networks-0b6e6a4337e8e9b6728f3604bb61a59365be3446.tar.gz fuse_networks-0b6e6a4337e8e9b6728f3604bb61a59365be3446.tar.bz2 fuse_networks-0b6e6a4337e8e9b6728f3604bb61a59365be3446.zip |
src/bound_set.c
Diffstat (limited to 'src/fortune')
-rw-r--r-- | src/fortune/defs.h | 2 | ||||
-rw-r--r-- | src/fortune/main.c | 4 | ||||
-rw-r--r-- | src/fortune/memory.c | 2 |
3 files changed, 3 insertions, 5 deletions
diff --git a/src/fortune/defs.h b/src/fortune/defs.h index b186581..9f1b1db 100644 --- a/src/fortune/defs.h +++ b/src/fortune/defs.h @@ -39,7 +39,7 @@ extern int nvertices; extern struct Freelist sfl; extern struct Site *bottomsite; -char **alloclist; +void **alloclist; int allocnum; struct Edge { diff --git a/src/fortune/main.c b/src/fortune/main.c index a1a4372..b6b4476 100644 --- a/src/fortune/main.c +++ b/src/fortune/main.c @@ -86,7 +86,7 @@ intptr_t *run_voronoi(unsigned int num, double *lattice, bool periodic, double x plot = 0; debug = 0; - alloclist = (char **)malloc(9 * num * sizeof(char *)); + alloclist = (void **)malloc(9 * num * sizeof(void *)); allocnum = 0; freeinit(&sfl, sizeof *sites); @@ -160,7 +160,6 @@ intptr_t *run_voronoi(unsigned int num, double *lattice, bool periodic, double x unsigned int real_vert_count = vert_count; unsigned int real_edge_count = edge_count; - unsigned int real_dual_count = dual_count; double *real_vert_list = vert_list; unsigned int *real_edge_list = edge_list; unsigned int *real_dual_list = dual_list; @@ -168,7 +167,6 @@ intptr_t *run_voronoi(unsigned int num, double *lattice, bool periodic, double x if (periodic) { real_vert_count = 0; real_edge_count = 0; - real_dual_count = 0; real_vert_list = (double *)malloc(2 * vert_count * sizeof(double)); real_edge_list = (unsigned int *)malloc(2 * edge_count * sizeof(unsigned int)); real_dual_list = (unsigned int *)malloc(3 * dual_count * sizeof(unsigned int)); diff --git a/src/fortune/memory.c b/src/fortune/memory.c index 807d1b0..3d62a92 100644 --- a/src/fortune/memory.c +++ b/src/fortune/memory.c @@ -13,7 +13,7 @@ char *getfree(fl) struct Freelist *fl; struct Freenode *t; if (fl->head == (struct Freenode *)NULL) { t = (struct Freenode *)myalloc(sqrt_nsites * fl->nodesize); - alloclist[allocnum] = t; + alloclist[allocnum] = (void *)t; allocnum++; for (i = 0; i < sqrt_nsites; i += 1) makefree((struct Freenode *)((char *)t + i * fl->nodesize), fl); |