aboutsummaryrefslogtreecommitdiff
path: root/lpg/libqr/code-layout.c
diff options
context:
space:
mode:
authorLeo Uino <leo@norisys.jp>2011-07-15 14:57:03 +0900
committerLeo Uino <leo@norisys.jp>2011-07-15 20:22:30 +0900
commitf7133a8a56650a2e5cefc66b6d9b87809a890b2e (patch)
tree3b22f8567ec2f2de13d7c3c030f7f4718099523a /lpg/libqr/code-layout.c
parenta5c8627f3152e9604bb65fef2e71015a66c82421 (diff)
downloadpdf-simple-sign-f7133a8a56650a2e5cefc66b6d9b87809a890b2e.tar.gz
pdf-simple-sign-f7133a8a56650a2e5cefc66b6d9b87809a890b2e.tar.xz
pdf-simple-sign-f7133a8a56650a2e5cefc66b6d9b87809a890b2e.zip
Remove (a few) magic numbers
Diffstat (limited to 'lpg/libqr/code-layout.c')
-rw-r--r--lpg/libqr/code-layout.c4
1 files changed, 2 insertions, 2 deletions
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;