From 47be86eb7929fd0d5b5a7180fcaa16835af2deb9 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Sat, 31 Oct 2020 13:01:22 -0700 Subject: [PATCH] fix incorrect comparison Operator precedence gets me every time. Equally binds stronger than bitwise logical operation. Fixes CID 363699 Signed-off-by: Dirk Hohndel --- src/garmin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/garmin.c b/src/garmin.c index 029f1d5..6eb5e4d 100644 --- a/src/garmin.c +++ b/src/garmin.c @@ -98,7 +98,7 @@ garmin_device_open (dc_device_t **out, dc_context_t *context, dc_iostream_t *ios // for a Descent Mk2/Mk2i, we have to use MTP to access its storage; // for Garmin devices, the model number corresponds to the lower three nibbles of the USB product ID // in order to have only one entry for the Mk2, we don't use the Mk2/APAC model number in our code - device->use_mtp = (model == 0x0FFF & DESCENT_MK2); + device->use_mtp = (model == (0x0FFF & DESCENT_MK2)); DEBUG(context, "Found Garmin with model 0x%x which is a %s\n", model, (device->use_mtp ? "Mk2/Mk2i" : "Mk1")); #endif