From 23ab000b7b038b6810e48a71a94b8287c20a6047 Mon Sep 17 00:00:00 2001 From: Simon Tatham Date: Sat, 22 Oct 2005 16:27:54 +0000 Subject: Cleanup: rename random_init() to random_new(), because it actually _allocates_ a random_state rather than just initialising one passed in by the caller. [originally from svn r6412] --- blackbox.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'blackbox.c') diff --git a/blackbox.c b/blackbox.c index dda036c..1889a19 100644 --- a/blackbox.c +++ b/blackbox.c @@ -692,9 +692,9 @@ static int check_guesses(game_state *state, int cagey) * grid, so that repeating the same marking will give * the same answer instead of a different one. */ - random_state *rs = random_init((char *)guesses->grid, - (state->w+2)*(state->h+2) * - sizeof(unsigned int)); + random_state *rs = random_new((char *)guesses->grid, + (state->w+2)*(state->h+2) * + sizeof(unsigned int)); n = random_upto(rs, n); random_free(rs); for (i = 0; i < guesses->nlasers; i++) { @@ -727,9 +727,9 @@ static int check_guesses(game_state *state, int cagey) * grid, so that repeating the same marking will give * the same answer instead of a different one. */ - random_state *rs = random_init((char *)guesses->grid, - (state->w+2)*(state->h+2) * - sizeof(unsigned int)); + random_state *rs = random_new((char *)guesses->grid, + (state->w+2)*(state->h+2) * + sizeof(unsigned int)); n = random_upto(rs, n); random_free(rs); for (i = 0; i < guesses->nlasers; i++) { -- cgit v1.1