summaryrefslogtreecommitdiff
path: root/driver_navcom.c
diff options
context:
space:
mode:
authorGary E. Miller <gem@rellim.com>2018-09-25 16:13:25 -0700
committerGary E. Miller <gem@rellim.com>2018-09-25 16:13:25 -0700
commitbed016316c9669a03891c326064f4ca494f84dba (patch)
treef2415859992a0de8ce3f1797cf44cd4baa7ed8e5 /driver_navcom.c
parentac15facf90bc57781c420342adc9dc27ebc2a761 (diff)
downloadgpsd-bed016316c9669a03891c326064f4ca494f84dba.tar.gz
driver_navcom: fix cppcheck nit.
Diffstat (limited to 'driver_navcom.c')
-rw-r--r--driver_navcom.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/driver_navcom.c b/driver_navcom.c
index 860ec43a..5e35d92a 100644
--- a/driver_navcom.c
+++ b/driver_navcom.c
@@ -614,9 +614,8 @@ static gps_mask_t handle_0x81(struct gps_device_t *session)
int32_t Omegadot = getles3224_be(buf, 78);
/* Question: What is the proper way of shifting a signed int 2 bits to
* the right, preserving sign? Answer: integer division by 4. */
- int16_t idot =
- (int16_t) (((getles16_be(buf, 82) & 0xfffc) /
- 4) | (getub(buf, 82) & 80 ? 0xc000 : 0x0000));
+ int16_t idot = (int16_t) (((getles16_be(buf, 82) & 0xfffc) / 4) |
+ ((getub(buf, 82) & 80) ? 0xc000 : 0x0000));
session->context->gps_week = (unsigned short)wn;
session->context->gps_tow = (double)(toc * SF_TOC);
/* leap second? */