diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2007-06-02 15:55:41 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2007-06-02 15:55:41 +0000 |
commit | fdc26c445b90902c0648b075e799efcbfc86a832 (patch) | |
tree | cb64e28ca66321b13a5600b951015158c5307ad1 /navcom.c | |
parent | a0fcd5e4a4d55de99796a918afdbe5fea40497fc (diff) | |
download | gpsd-fdc26c445b90902c0648b075e799efcbfc86a832.tar.gz |
Change a cast location so splint won't barf on getsl24.
For consistency, change getul24 the same way.
Diffstat (limited to 'navcom.c')
-rw-r--r-- | navcom.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -50,8 +50,8 @@ #include "bits.h" /* Have data which is 24 bits long */ -#define getsl24(buf,off) ((int32_t)((u_int32_t)getub((buf), (off)+2)<<24 | (u_int32_t)getub((buf), (off)+1)<<16 | (u_int32_t)getub((buf), (off))<<8)>>8) -#define getul24(buf,off) ((u_int32_t)((u_int32_t)getub((buf), (off)+2)<<24 | (u_int32_t)getub((buf), (off)+1)<<16 | (u_int32_t)getub((buf), (off))<<8)>>8) +#define getsl24(buf,off) (int32_t)(((u_int32_t)getub((buf), (off)+2)<<24 | (u_int32_t)getub((buf), (off)+1)<<16 | (u_int32_t)getub((buf), (off))<<8)>>8) +#define getul24(buf,off) (u_int32_t)(((u_int32_t)getub((buf), (off)+2)<<24 | (u_int32_t)getub((buf), (off)+1)<<16 | (u_int32_t)getub((buf), (off))<<8)>>8) /* And just to be difficult, Navcom is little endian but the GPS data stream is big endian. Some messages contain raw GPS data */ |