summaryrefslogtreecommitdiff
path: root/apps/plugins/sudoku/generator.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/sudoku/generator.c')
-rw-r--r--apps/plugins/sudoku/generator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/sudoku/generator.c b/apps/plugins/sudoku/generator.c
index 3d37bde22a..59bb9066cc 100644
--- a/apps/plugins/sudoku/generator.c
+++ b/apps/plugins/sudoku/generator.c
@@ -54,7 +54,7 @@
54 54
55#define STATE_MASK 0x0000ff80 55#define STATE_MASK 0x0000ff80
56#define STATE_SHIFT (7-1) /* digits 1..9 */ 56#define STATE_SHIFT (7-1) /* digits 1..9 */
57#define DIGIT_STATE(digit) (1<<(STATE_SHIFT+(digit))) 57#define DIGIT_STATE(digit) BIT_N(STATE_SHIFT+(digit))
58 58
59#define DIGIT_MASK 0x000f0000 59#define DIGIT_MASK 0x000f0000
60#define DIGIT_SHIFT 16 60#define DIGIT_SHIFT 16
@@ -266,7 +266,7 @@ numset( int mask )
266{ 266{
267 int i, n = 0; 267 int i, n = 0;
268 for( i = STATE_SHIFT + 1 ; i <= STATE_SHIFT + 9 ; ++i ) 268 for( i = STATE_SHIFT + 1 ; i <= STATE_SHIFT + 9 ; ++i )
269 if( mask & (1<<i) ) 269 if( mask & BIT_N(i) )
270 ++n; 270 ++n;
271 else 271 else
272 ++counts[ i - STATE_SHIFT - 1 ]; 272 ++counts[ i - STATE_SHIFT - 1 ];