diff options
| author | Simon Tatham <anakin@pobox.com> | 2023-04-20 13:56:44 +0100 |
|---|---|---|
| committer | Simon Tatham <anakin@pobox.com> | 2023-04-20 17:22:23 +0100 |
| commit | f21c7d27664bc43d3e5a9401756860c03055c3aa (patch) | |
| tree | 132993b10b21f8be6e559174c50a3ac12b5901fe /loopy.c | |
| parent | 11a8149d673d96bec17d6487b5fa95b5bf5ffd6b (diff) | |
| download | puzzles-f21c7d27664bc43d3e5a9401756860c03055c3aa.zip puzzles-f21c7d27664bc43d3e5a9401756860c03055c3aa.tar.gz puzzles-f21c7d27664bc43d3e5a9401756860c03055c3aa.tar.bz2 puzzles-f21c7d27664bc43d3e5a9401756860c03055c3aa.tar.xz | |
Consistently use snew_dsf to allocate dsfs.
All remaining cases where a dsf was allocated via snewn(foo, int) are
removed by this change.
Diffstat (limited to 'loopy.c')
| -rw-r--r-- | loopy.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -455,7 +455,7 @@ static solver_state *dup_solver_state(const solver_state *sstate) { ret->solver_status = sstate->solver_status; ret->diff = sstate->diff; - ret->dotdsf = snewn(num_dots, int); + ret->dotdsf = snew_dsf(num_dots); ret->looplen = snewn(num_dots, int); dsf_copy(ret->dotdsf, sstate->dotdsf, num_dots); memcpy(ret->looplen, sstate->looplen, @@ -485,7 +485,7 @@ static solver_state *dup_solver_state(const solver_state *sstate) { } if (sstate->linedsf) { - ret->linedsf = snewn(num_edges, int); + ret->linedsf = snew_dsf(num_edges); dsf_copy(ret->linedsf, sstate->linedsf, num_edges); } else { ret->linedsf = NULL; |