From: Bert Vermeulen Date: Thu, 2 Oct 2014 12:11:35 +0000 (+0200) Subject: agilent-dmm: Code cleanup. X-Git-Tag: libsigrok-0.4.0~902 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=90486ba835ff82c316d63b3d3b69581615d9245a;p=libsigrok.git agilent-dmm: Code cleanup. This cleans up a warning generated by clang's static analyzer. --- diff --git a/src/hardware/agilent-dmm/sched.c b/src/hardware/agilent-dmm/sched.c index 66cb60a2..df651134 100644 --- a/src/hardware/agilent-dmm/sched.c +++ b/src/hardware/agilent-dmm/sched.c @@ -137,9 +137,9 @@ static int agdmm_send(const struct sr_dev_inst *sdi, const char *cmd) sr_spew("Sending '%s'.", cmd); strncpy(buf, cmd, 28); if (!strncmp(buf, "*IDN?", 5)) - strncat(buf, "\r\n", 32); + strcat(buf, "\r\n"); else - strncat(buf, "\n\r\n", 32); + strcat(buf, "\n\r\n"); if (serial_write_blocking(serial, buf, strlen(buf)) == -1) { sr_err("Failed to send: %s.", strerror(errno)); return SR_ERR;