diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2008-07-08 07:14:53 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2008-07-08 07:14:53 +0000 |
commit | 1819dabea9232eee3f7d70888da3d804bd403690 (patch) | |
tree | cc12e0af72098d8db4a9d711af68ebdfe63e3e3e /bits.h | |
parent | ca3b1e3a1d85885548cd124ef76b2f4ae0e8003f (diff) | |
download | gpsd-1819dabea9232eee3f7d70888da3d804bd403690.tar.gz |
Fix unclean references to the packet output buffer from bits.h.
Diffstat (limited to 'bits.h')
-rw-r--r-- | bits.h | 16 |
1 files changed, 8 insertions, 8 deletions
@@ -75,11 +75,11 @@ union long_double { /* Zodiac protocol description uses 1-origin indexing by little-endian word */ -#define getword(n) ( (session->packet.outbuffer[2*(n)-2]) \ - | (session->packet.outbuffer[2*(n)-1] << 8)) -#define getlong(n) ( (session->packet.outbuffer[2*(n)-2]) \ - | (session->packet.outbuffer[2*(n)-1] << 8) \ - | (session->packet.outbuffer[2*(n)+0] << 16) \ - | (session->packet.outbuffer[2*(n)+1] << 24)) -#define getstring(t, s, e) \ - (void)memcpy(t, session->packet.outbuffer+2*(s)-2, 2*((e)-(s)+1)) +#define getwordz(buf, n) ( (buf[2*(n)-2]) \ + | (buf[2*(n)-1] << 8)) +#define getlongz(buf, n) ( (buf[2*(n)-2]) \ + | (buf[2*(n)-1] << 8) \ + | (buf[2*(n)+0] << 16) \ + | (buf[2*(n)+1] << 24)) +#define getstringz(to, from, s, e) \ + (void)memcpy(to, from+2*(s)-2, 2*((e)-(s)+1)) |