diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2008-07-10 12:20:40 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2008-07-10 12:20:40 +0000 |
commit | 588464026d2f9da393fc8233a18b88b5c050e8cb (patch) | |
tree | 868f221f6bdb51759bba46ae5246c5b2f7ac4dc8 /crc24q.c | |
parent | b156c0599ffac902a30e76ad0de34bf2df6ea1b3 (diff) | |
download | gpsd-588464026d2f9da393fc8233a18b88b5c050e8cb.tar.gz |
Minor polishing for possible future code reuse.
Diffstat (limited to 'crc24q.c')
-rw-r--r-- | crc24q.c | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -35,7 +35,8 @@ unsigned table[25]; -#define CRCPOLY 0x1864CFB +#define CRCSEED 0 /* could be NZ to detect leading zeros */ +#define CRCPOLY 0x1864CFB /* encodes all info about the polynomial */ static void crc_init(unsigned table[256]) @@ -43,7 +44,7 @@ crc_init(unsigned table[256]) unsigned i, j; unsigned h; - table[0] = 0; + table[0] = CRCSEED; table[1] = h = CRCPOLY; for (i = 2; i < 256; i *= 2) { |