summaryrefslogtreecommitdiff
path: root/srecord.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2013-11-05 20:21:42 -0500
committerEric S. Raymond <esr@thyrsus.com>2013-11-05 20:21:42 -0500
commit032607920d8d6f335e3bfbca1fc76e9d77dc7457 (patch)
tree632e28102497e16d43be91ca0dbcec5a7ed5041c /srecord.c
parent6a0157a94666ae5a653bc297aedc1f6c8f1eaf3a (diff)
downloadgpsd-032607920d8d6f335e3bfbca1fc76e9d77dc7457.tar.gz
Full splint cleanup. Partial cppcheck cleanup.
Diffstat (limited to 'srecord.c')
-rw-r--r--srecord.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/srecord.c b/srecord.c
index 402a6e30..b76ba9ac 100644
--- a/srecord.c
+++ b/srecord.c
@@ -121,7 +121,7 @@ unsigned char
sr_sum(unsigned int count, unsigned int addr, unsigned char *bbuf)
{
int i, j;
- unsigned char k, sum = 0;
+ unsigned char sum = 0;
sum = (count & 0xff);
sum += ((addr & 0x000000ff));
@@ -130,7 +130,7 @@ sr_sum(unsigned int count, unsigned int addr, unsigned char *bbuf)
sum += ((addr & 0xff000000) >> 24);
j = count - 5;
for (i = 0; i < j; i++) {
- k = bbuf[i];
+ unsigned char k = bbuf[i];
sum += k;
}
return ~sum;