diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2013-06-06 01:05:05 +0200 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-06-17 17:30:14 +0200 |
commit | 19c4577a90015f6e05066a861d560f9702ad642d (patch) | |
tree | 801538b4a4f68af64ea8ec0e6a0b653c920d9d32 | |
parent | 943fd24fa6f907cd00dde4465bb39e1da382cff9 (diff) |
axgetput: Simplify do_crc() a bit.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | ax25/axgetput/proto_bin.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/ax25/axgetput/proto_bin.c b/ax25/axgetput/proto_bin.c index 401290d..c69bc87 100644 --- a/ax25/axgetput/proto_bin.c +++ b/ax25/axgetput/proto_bin.c @@ -37,8 +37,7 @@ static int init_crc(void) static int do_crc(char b, unsigned int crc) { - crc = (crctab[(crc >> 8)] ^ ((crc << 8) | (b & 0xff))) & 0xffff; - return crc; + return (crctab[(crc >> 8)] ^ ((crc << 8) | (b & 0xff))) & 0xffff; } unsigned int calc_crc(char *buf, int n, unsigned crc) |