]> sigrok.org Git - libsigrok.git/blobdiff - src/dmm/ut372.c
Replace some magic numbers with a #define.
[libsigrok.git] / src / dmm / ut372.c
index d9c7720fd16bce17323271ef0c25554c7caa4131..2de3da3436fbb60e25b6de6f39240642caeed1b1 100644 (file)
@@ -118,7 +118,7 @@ SR_PRIV int sr_ut372_parse(const uint8_t *buf, float *floatval,
        divisor = 1;
 
        for (i = 0; i < 5; i++) {
-               segments = decode_pair(buf + 1 + 2*i);
+               segments = decode_pair(buf + 1 + (2 * i));
                for (j = 0; j < ARRAY_SIZE(lookup); j++) {
                        if (lookup[j] == (segments & ~DECIMAL_POINT_MASK)) {
                                value += j * pow(10, i);