summaryrefslogtreecommitdiff
path: root/contrib/motosend.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 /contrib/motosend.c
parent6a0157a94666ae5a653bc297aedc1f6c8f1eaf3a (diff)
downloadgpsd-032607920d8d6f335e3bfbca1fc76e9d77dc7457.tar.gz
Full splint cleanup. Partial cppcheck cleanup.
Diffstat (limited to 'contrib/motosend.c')
-rw-r--r--contrib/motosend.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/contrib/motosend.c b/contrib/motosend.c
index c1c3e477..f8e505ea 100644
--- a/contrib/motosend.c
+++ b/contrib/motosend.c
@@ -166,8 +166,9 @@ char *gpsd_hexdump(char *binbuf, size_t binbuflen)
return hexbuf;
}
-int gpsd_hexpack(char *src, char *dst, int len){
- int i, k, l;
+int gpsd_hexpack(char *src, char *dst, int len)
+{
+ int i, l;
l = (int)(strlen(src) / 2);
if ((l < 1) || (l > len))
@@ -175,7 +176,7 @@ int gpsd_hexpack(char *src, char *dst, int len){
bzero(dst, len);
for (i = 0; i < l; i++)
- if ((k = hex2bin(src+i*2)) != -1)
+ if (hex2bin(src+i*2) != -1)
dst[i] = (char)(k & 0xff);
else
return -1;