Fix src/cfg.c and test/cfg.c