summaryrefslogtreecommitdiff
path: root/navcom.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2007-06-02 15:55:41 +0000
committerEric S. Raymond <esr@thyrsus.com>2007-06-02 15:55:41 +0000
commitfdc26c445b90902c0648b075e799efcbfc86a832 (patch)
treecb64e28ca66321b13a5600b951015158c5307ad1 /navcom.c
parenta0fcd5e4a4d55de99796a918afdbe5fea40497fc (diff)
downloadgpsd-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.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/navcom.c b/navcom.c
index ea810f2d..3c1513b4 100644
--- a/navcom.c
+++ b/navcom.c
@@ -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 */