Skip to content

Commit 8989bcc

Browse files
committed
fs/ctab: update for newer check, fix typo
1 parent ace2f7d commit 8989bcc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

fs/ctab.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
#include "coarse.h"
77

88
/* FIXME: errors here cause shit to hang after gfa is loaded, ie no draw */
9-
/* FIXME: move buildct here and start it automatically once nodes are loaded if
10-
* no ctab is scheduled for load */
119

1210
static inline int
1311
getval(char *s, ioff *ip)
@@ -31,7 +29,7 @@ loadct(void *arg)
3129
CNode *U, *UE;
3230

3331
path = arg;
34-
if(cnodes != nil){
32+
if(graph.flags & GFctarmed){
3533
logerr(va("loadctab %s: coarsening table already initialized\n", path));
3634
return;
3735
}
@@ -74,14 +72,15 @@ loadct(void *arg)
7472
werrstr("too few records in ctab, %zd < %zd", U-cnodes, UE-cnodes);
7573
r = -1;
7674
}
75+
graph.flags |= GFctarmed;
7776
pushcmd("cmd(\"FHJ142\")"); /* signal needed to continue, error or no */
7877
flushcmd();
7978
if(r < 0)
8079
logerr(va("loadctab %s: %s, line %d\n", path, error(), f->nr));
8180
else
8281
logmsg("loadctab: done\n");
83-
free(f);
8482
free(path);
83+
freefs(f);
8584
}
8685

8786
static Filefmt ff = {

0 commit comments

Comments
 (0)