summaryrefslogtreecommitdiff
path: root/misc/svgmap
diff options
context:
space:
mode:
authorepochqwert <epoch@53flpnlls43fcguy.onion>2015-02-07 04:38:07 -0600
committerepochqwert <epoch@53flpnlls43fcguy.onion>2015-02-07 04:38:07 -0600
commite751fa847caee5c8fc6c1bd0c7f49505d685bea6 (patch)
tree64612c319fe84d8fa26d4eee524a1dbe31df3a25 /misc/svgmap
parente79f3c775cb1957e09716d7782d91da33fa8f0c8 (diff)
downloadmisc-e751fa847caee5c8fc6c1bd0c7f49505d685bea6.tar.gz
misc-e751fa847caee5c8fc6c1bd0c7f49505d685bea6.zip
a bit of cleanup.
Diffstat (limited to 'misc/svgmap')
-rw-r--r--misc/svgmap/paths-to-edges.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/misc/svgmap/paths-to-edges.c b/misc/svgmap/paths-to-edges.c
index 526f890..7e485b1 100644
--- a/misc/svgmap/paths-to-edges.c
+++ b/misc/svgmap/paths-to-edges.c
@@ -8,7 +8,7 @@ struct link {
int count;
};
-struct link ** get_links(char ***data) {
+struct link **get_links(char ***data) {
int i,j,k=0;
for(i=0;data[i];i++) {
for(j=0;data[i][j];j++) {
@@ -16,8 +16,7 @@ struct link ** get_links(char ***data) {
//new space allocated.
}
}
- struct link **link=malloc(sizeof(struct link *) * k+1); //???
- memset(link,0,sizeof(struct link *) * k+1);
+ struct link **link=calloc(k+1,sizeof(struct link *));
for(i=0;data[i];i++) {
for(j=0;data[i][j+1];j++) {
for(k=0;link[k];k++) {
@@ -68,7 +67,6 @@ char *recurse_readline(int chars) {
return malloced;
}
-//this is the function failing on full-size data.
char ***lines_to_data(char **lines) {
char ***data;
int i,j,k,n,m;
@@ -85,7 +83,6 @@ char ***lines_to_data(char **lines) {
data[i+1]=0;
data[i][k]=0;
}
-/* in this for loop somewhere. */
for(i=0;lines[i];i++) {
k=0;
n=0;