From f7133a8a56650a2e5cefc66b6d9b87809a890b2e Mon Sep 17 00:00:00 2001 From: Leo Uino Date: Fri, 15 Jul 2011 14:57:03 +0900 Subject: Remove (a few) magic numbers --- lpg/libqr/code-layout.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lpg/libqr/code-layout.c') diff --git a/lpg/libqr/code-layout.c b/lpg/libqr/code-layout.c index 97cf3af..8b4522d 100644 --- a/lpg/libqr/code-layout.c +++ b/lpg/libqr/code-layout.c @@ -167,7 +167,7 @@ unsigned int qr_layout_read(struct qr_iterator * i) unsigned int x = 0; int b; - for (b = 0; b < 8; ++b) { + for (b = 0; b < QR_WORD_BITS; ++b) { x = (x << 1) | ((*i->p & i->mask) ? 1 : 0); advance(i); } @@ -179,7 +179,7 @@ void qr_layout_write(struct qr_iterator * i, unsigned int x) { int b; - for (b = 0; b < 8; ++b) { + for (b = 0; b < QR_WORD_BITS; ++b) { *i->p |= (x & 0x80) ? i->mask : 0; advance(i); x <<= 1; -- cgit v1.2.3-70-g09d2