diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2012-05-30 13:46:12 -0400 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2012-05-30 13:46:41 -0400 |
commit | ac67f2d3eed20253e6a150b5e0b5936526ce1404 (patch) | |
tree | f4fa9981b6de4da79823489d865049117c012fe9 /bits.h | |
parent | 939e5d85eaa075517b38c184b2e5cfc5335db458 (diff) | |
download | gpsd-ac67f2d3eed20253e6a150b5e0b5936526ce1404.tar.gz |
Remove a kludge. Affects only the Evermore binary driver.
If I botched incrementing any of the offsets, this could break the Evermore
binary driver - no way to test that, we don't have a xapture log for it. But
the regression tests we do have all pass.
Diffstat (limited to 'bits.h')
-rw-r--r-- | bits.h | 13 |
1 files changed, 3 insertions, 10 deletions
@@ -29,17 +29,10 @@ union long_double { double d; }; -#ifndef GET_ORIGIN -#define GET_ORIGIN 0 -#endif -#ifndef PUT_ORIGIN -#define PUT_ORIGIN 0 -#endif - /* these are independent of byte order */ -#define getsb(buf, off) ((int8_t)buf[(off)-(GET_ORIGIN)]) -#define getub(buf, off) ((uint8_t)buf[(off)-(GET_ORIGIN)]) -#define putbyte(buf,off,b) do {buf[(off)-(PUT_ORIGIN)] = (unsigned char)(b);} while (0) +#define getsb(buf, off) ((int8_t)buf[off]) +#define getub(buf, off) ((uint8_t)buf[off]) +#define putbyte(buf,off,b) do {buf[off] = (unsigned char)(b);} while (0) /* little-endian access */ #define getles16(buf, off) ((int16_t)(((uint16_t)getub((buf), (off)+1) << 8) | (uint16_t)getub((buf), (off)))) |