aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAurelien Jacobs <aurel@gnuage.org>2017-01-16 11:45:20 +0100
committerAurelien Jacobs <aurel@gnuage.org>2017-01-22 19:03:29 +0100
commit4fdedbbb3a5f0caf2765bade0d109b6f917f5f41 (patch)
tree9a8ae582ff7ac4d14d9ea1121fc51fb7405ec85d
parent841aadc95b918fd883d36c6c8555f8cb0e3cd049 (diff)
agilent-dmm: Set correct length in strncmp().
-rw-r--r--src/hardware/agilent-dmm/protocol.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/hardware/agilent-dmm/protocol.c b/src/hardware/agilent-dmm/protocol.c
index cfbb3c3..9122355 100644
--- a/src/hardware/agilent-dmm/protocol.c
+++ b/src/hardware/agilent-dmm/protocol.c
@@ -705,7 +705,7 @@ static int recv_conf_u124x_5x(const struct sr_dev_inst *sdi, GMatchInfo *match)
devc->cur_digits[i] = 4;
devc->cur_encoding[i] = 5;
} else if (!strncmp(mstr, "T1", 2) || !strncmp(mstr, "T2", 2) ||
- !strncmp(mstr, "TEMP", 2)) {
+ !strncmp(mstr, "TEMP", 4)) {
devc->cur_mq[i] = SR_MQ_TEMPERATURE;
m2 = g_match_info_fetch(match, 2);
if (!m2)