diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2015-03-24 14:36:03 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2015-03-24 14:36:03 -0400 |
commit | f20c924ae563c7a60246f628029c3bf232bd4f0a (patch) | |
tree | cdc9d0e3290fdfb569ca5c0ba4e5d210a9b4b2da /contrib/motosend.c | |
parent | 0dac112485e7a7117bd9ac735625f20e10750e79 (diff) | |
download | gpsd-f20c924ae563c7a60246f628029c3bf232bd4f0a.tar.gz |
Minor repair to motosend.c.
Diffstat (limited to 'contrib/motosend.c')
-rw-r--r-- | contrib/motosend.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/contrib/motosend.c b/contrib/motosend.c index f8e505ea..05c73530 100644 --- a/contrib/motosend.c +++ b/contrib/motosend.c @@ -168,7 +168,7 @@ char *gpsd_hexdump(char *binbuf, size_t binbuflen) int gpsd_hexpack(char *src, char *dst, int len) { - int i, l; + int i, l, k; l = (int)(strlen(src) / 2); if ((l < 1) || (l > len)) @@ -176,7 +176,7 @@ int gpsd_hexpack(char *src, char *dst, int len) bzero(dst, len); for (i = 0; i < l; i++) - if (hex2bin(src+i*2) != -1) + if ((k = hex2bin(src+i*2)) != -1) dst[i] = (char)(k & 0xff); else return -1; |