agilent-dmm: Code cleanup.

This cleans up a warning generated by clang's static analyzer.
This commit is contained in:
Bert Vermeulen 2014-10-02 14:11:35 +02:00
parent f3616a0857
commit 90486ba835
1 changed files with 2 additions and 2 deletions

View File

@ -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;