Consistently use snew_dsf to allocate dsfs.

All remaining cases where a dsf was allocated via snewn(foo, int) are
removed by this change.
This commit is contained in:
Simon Tatham
2023-04-20 13:56:44 +01:00
parent 11a8149d67
commit f21c7d2766
8 changed files with 11 additions and 13 deletions

View File

@ -407,7 +407,7 @@ static void make_board(int *board, int w, int h, random_state *rs) {
* contains a shuffled list of numbers {0, ..., sz-1}. */
for (i = 0; i < sz; ++i) board[i] = i;
dsf = snewn(sz, int);
dsf = snew_dsf(sz);
retry:
dsf_init(dsf, sz);
shuffle(board, sz, sizeof (int), rs);